We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98683d2 commit 5d42cc3Copy full SHA for 5d42cc3
src/node_object_wrap.h
@@ -26,8 +26,7 @@ class ObjectWrap {
26
{
27
assert(!handle.IsEmpty());
28
assert(handle->InternalFieldCount() > 0);
29
- return static_cast<T*>(v8::Handle<v8::External>::Cast(
30
- handle->GetInternalField(0))->Value());
+ return static_cast<T*>(handle->GetPointerFromInternalField(0));
31
}
32
33
v8::Persistent<v8::Object> handle_; // ro
@@ -38,7 +37,7 @@ class ObjectWrap {
38
37
assert(handle_.IsEmpty());
39
40
handle_ = v8::Persistent<v8::Object>::New(handle);
41
- handle_->SetInternalField(0, v8::External::New(this));
+ handle_->SetPointerInInternalField(0, this);
42
MakeWeak();
43
44
0 commit comments