summaryrefslogtreecommitdiff
path: root/src/node_object_wrap.h
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-09-09 15:47:37 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-09-09 15:47:37 -0700
commit5d42cc3a44f87e401edcff11971b10dfd2180f3c (patch)
tree254ada666158acd5a343b3a05f2d2512f863e4d7 /src/node_object_wrap.h
parent98683d285c7130076e4716943dcfd133823b4702 (diff)
downloadnode-5d42cc3a44f87e401edcff11971b10dfd2180f3c.tar.gz
Use SetPointerInInternalField
Diffstat (limited to 'src/node_object_wrap.h')
-rw-r--r--src/node_object_wrap.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/node_object_wrap.h b/src/node_object_wrap.h
index ccb1eb8c2..3002e6175 100644
--- a/src/node_object_wrap.h
+++ b/src/node_object_wrap.h
@@ -26,8 +26,7 @@ class ObjectWrap {
{
assert(!handle.IsEmpty());
assert(handle->InternalFieldCount() > 0);
- return static_cast<T*>(v8::Handle<v8::External>::Cast(
- handle->GetInternalField(0))->Value());
+ return static_cast<T*>(handle->GetPointerFromInternalField(0));
}
v8::Persistent<v8::Object> handle_; // ro
@@ -38,7 +37,7 @@ class ObjectWrap {
assert(handle_.IsEmpty());
assert(handle->InternalFieldCount() > 0);
handle_ = v8::Persistent<v8::Object>::New(handle);
- handle_->SetInternalField(0, v8::External::New(this));
+ handle_->SetPointerInInternalField(0, this);
MakeWeak();
}