Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Discussion: use the V8 version that comes with node.js instead of Chromium

853 views
Skip to first unread message

and....@gmail.com

unread,
Nov 28, 2013, 3:56:29 PM11/28/13
to node-...@googlegroups.com
Hello,

After having a problem with compiling a native module with nw-gyp for node-webkit 0.8.1 (node 0.10.22), which compiled fine with node-gyp for node.js 0.10.22 I realized that although the same node-version is used, it does not use the same V8 version (surprise!) and thus uses different V8 headers - hence the compilation errors.

Node-webkit obviously uses the version of V8 that comes with Chromium (which is generally newer).

This is quite a big thing, as node module owners won't update their native code to be compatible to new V8 versions as long as node.js still uses an older V8 version, making them break with node-webkit. npm also only checks against node version (package.json => engine) for compatibility - not against V8 version,

From a module point of view: wouldn't it be better to use the V8 version from node.js even though it is not as new as Chromiums V8 version? This ensures module compatibility between node.js standalone and node-webkit...

Thanks for any insights on that matter!

Roger

unread,
Nov 28, 2013, 5:40:26 PM11/28/13
to and....@gmail.com, node-...@googlegroups.com
Hello,

Using the previous v8 version in Chromium is harder than using a newer
v8 version in Node.

I do want to support the native modules well, so I'm going to add a
compatibility layer in the v8 Chromium is using to support all the
deprecated APIs. I hope this can be done in 0.8.x or 0.9.0.

Thanks
--
Roger

Roger WANG

unread,
Dec 16, 2013, 9:12:27 PM12/16/13
to Roger, and....@gmail.com, node-...@googlegroups.com
Roger <wen...@gmail.com> writes:

> Hello,
>
> Using the previous v8 version in Chromium is harder than using a newer
> v8 version in Node.
>
> I do want to support the native modules well, so I'm going to add a
> compatibility layer in the v8 Chromium is using to support all the
> deprecated APIs. I hope this can be done in 0.8.x or 0.9.0.

In 0.8.2 the compatibility layer is improved (providing MakeWeak) to
fix bugs when building some modules. If you find other issues please
report it.

In future 0.9.0, which will be based on Chromium 32, the differences
between the 2 V8 versions (3.22.24 vs 3.14.5) is too big that
maintaining this layer is not a wise decision any more. While in the
upcoming Node 0.12, the v8 version is almost the same with Chromium's.

So starting from node-webkit 0.9.0, the Node.js come with it will be
updated to the latest Node 0.11.x version. In the same time, node-webkit
0.8.x will be kept maintained and updated until Node v0.12 is released.

Thanks
--
Roger WANG Intel Open Source Technology Center

https://github.com/rogerwang/node-webkit
node-webkit: Call all Node.js modules directly from DOM and enable
a new way of writing applications with all Web technologies.
Reply all
Reply to author
Forward
0 new messages