diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-06-12 02:07:26 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-06-12 02:07:28 +0400 |
commit | 393d33e7ea44a4410729e50303a6ad0d62558a8c (patch) | |
tree | 0ecf621b653f04a6e5e1113aa42caea90f64c362 /src/node_object_wrap.h | |
parent | 2dbc5ea1b449c08b9af4655af1fe875e124b386b (diff) |
src: upgrade after v8 api change
The prototype of v8::Persistent<T>::MakeWeak() has changed. Update the
code in src/ to follow suit.
Diffstat (limited to 'src/node_object_wrap.h')
-rw-r--r-- | src/node_object_wrap.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/node_object_wrap.h b/src/node_object_wrap.h index 4495b1741dd..19f536dfe9a 100644 --- a/src/node_object_wrap.h +++ b/src/node_object_wrap.h @@ -115,14 +115,13 @@ class NODE_EXTERN ObjectWrap { private: static void WeakCallback(v8::Isolate* isolate, - v8::Persistent<v8::Value> value, - void* data) { + v8::Persistent<v8::Object>* pobj, + ObjectWrap* wrap) { v8::HandleScope scope(isolate); - ObjectWrap *obj = static_cast<ObjectWrap*>(data); - assert(value == obj->handle_); - assert(!obj->refs_); - assert(value.IsNearDeath(isolate)); - delete obj; + assert(wrap->refs_ == 0); + assert(*pobj == wrap->handle_); + assert((*pobj).IsNearDeath(isolate)); + delete wrap; } }; |