make proxy_container into a class; new/delete #20

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

rvagg commented Nov 18, 2013

Like this. Tests pass in 0.11.8, 0.10.22 and 0.8.25 with these changes.

The difference between the old way of assigning Persistent references and the new way is this (this is from nan.h):

// old
handle = v8::Persistent<type>::New(obj);
// new
handle.Reset(nan_isolate, obj);

Since you can't just assign to a handle variable now you need an existing empty handle to Reset() to. If we make proxy_container into a class then we get empty handles initialised on new which we can then Reset() while old V8 can reassign.

Owner

TooTallNate commented Nov 18, 2013

On a conceptual level, I don't actually understand the difference between these two. There's my lack of C++ skills for ya :p Care to explain?

The tests do indeed pass though so merged in 0167f70. Thanks!

TooTallNate referenced this pull request Nov 18, 2013

Merged

Use `rvagg/nan` #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment