From 5d42cc3a44f87e401edcff11971b10dfd2180f3c Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 9 Sep 2010 15:47:37 -0700 Subject: Use SetPointerInInternalField --- src/node_object_wrap.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/node_object_wrap.h') diff --git a/src/node_object_wrap.h b/src/node_object_wrap.h index ccb1eb8c25..3002e61759 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(v8::Handle::Cast( - handle->GetInternalField(0))->Value()); + return static_cast(handle->GetPointerFromInternalField(0)); } v8::Persistent handle_; // ro @@ -38,7 +37,7 @@ class ObjectWrap { assert(handle_.IsEmpty()); assert(handle->InternalFieldCount() > 0); handle_ = v8::Persistent::New(handle); - handle_->SetInternalField(0, v8::External::New(this)); + handle_->SetPointerInInternalField(0, this); MakeWeak(); } -- cgit v1.2.3