Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

v8 3.17 upgrade #5077

Closed
wants to merge 12 commits into from
Closed

v8 3.17 upgrade #5077

wants to merge 12 commits into from

Conversation

trevnorris
Copy link

Upgrading to 3.17 for the v0.12 release early to help find any regressions and work out any api changes. (note: this won't be put into v0.10).

@bnoordhuis
Copy link
Member

I nominate @indutny as reviewer. Fedor, make sure to check every line carefully.

(Kidding aside, I guess it LGTM.)

@rvagg
Copy link
Member

rvagg commented Mar 19, 2013

Is this going to mean that we get compile error pain for all our addons that don't reference the current isolate for Persistent::New? I guess that's going to cause some headaches for backward compatibility where we get to choose between compile warnings and only being compatible with this version onwards?

@trevnorris
Copy link
Author

@rvagg You'll just get a "Deprecated" warning at compile-time. It's still completely backwards compatible. Oh, and you'll get warning for a lot more than just Persistent::New. ;-)

trevnorris and others added 12 commits March 19, 2013 12:40
Remove compiler switches from $(TOPLEVEL)/deps/v8/build/common.gypi,
they are set globally in $(TOPLEVEL)/common.gypi.
All compile time warnings about using deprecated APIs have been
suppressed by updating node's API. Though there are still many function
calls that can accept Isolate, and still need to be updated.

node_isolate had to be added as an extern variable in node.h and
node_object_wrap.h

Also a couple small fixes for Error handling.

Before v8 3.16.6 the error stack message was lazily written when it was
needed, which allowed you to change the message after instantiation.
Then the stack would be written with the new message the first time it
was accessed. Though that has changed. Now it creates the stack message
on instantiation. So setting a different message afterwards won't be
displayed.

This is not a complete fix for the problem. Getting error without any
message isn't very useful.
Revert "v8: fix postmortem and dtrace helper build"

This reverts commit aa98539.
Continuation lines should be indented with 4 spaces, not a tab.
Every constant is certainly 4 bytes now, but freebsd's objdump utility
prints out odd byte sequences (5-bytes, 6-bytes and even 9-bytes long)
for v8's data section. We can safely ignore all upper bytes, because all
constants that we're using are just `int`s. Since on all supported
platforms `int` is 32bit long (and anyway v8's constants are 32bit too),
we ignore all higher bits if they were read.
Part of the 3.17 update is to pass the isolate as an argument. The addon
docs have been updated with this usage.
Update the api to pass node_isolate to all supported methods.

Much thanks to Ben Noordhuis and his work in 51f6e6a.
@rvagg
Copy link
Member

rvagg commented Mar 20, 2013

Perhaps we could have NODE_MODULE_VERSION incremented for this, or even introduce a new NODE_VERSION macro? Then in our addons we could do something like this:

#if NODE_MODULE_VERSION > 0x000B
#  define NODE_ISOLATE node_isolate
#  define NODE_ISOLATE_PRE node_isolate, 
#  define NODE_ISOLATE_POST , node_isolate 
#else
#  define NODE_ISOLATE
#  define NODE_ISOLATE_PRE
#  define NODE_ISOLATE_POST
#endif
HandleScope scope(NODE_ISOLATE);
Local<Integer> foo = Integer::New(100 NODE_ISOLATE_POST);
Persistent<Value> fooPersistent = Persistent<Value>::New(NODE_ISOLATE_PRE foo);

Just to satisfy those of us with an OCD need to not have compile warnings; unless someone has a better suggestion?

@bnoordhuis
Copy link
Member

I'm fine with that. I'm running the tests now. If nothing shocking comes out, I'll merge the PR and bump NODE_MODULE_VERSION.

@bnoordhuis
Copy link
Member

Landed. NODE_MODULE_VERSION bump in ad819bc.

@bnoordhuis bnoordhuis closed this Mar 20, 2013
@rvagg
Copy link
Member

rvagg commented Mar 20, 2013

👍 it's ugly but much less ugly than the reams of compile warnings (people are going to hate that!) Level/leveldown@cc48eef

@indutny
Copy link
Member

indutny commented Mar 20, 2013

@bnoordhuis why closing the PR?

@indutny indutny reopened this Mar 20, 2013
@trevnorris
Copy link
Author

already landed. though still need to fix the build for sunos because of dtrace.

@trevnorris trevnorris closed this Mar 20, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants