Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2013-06-12 02:07:26 +0400
committerBen Noordhuis <info@bnoordhuis.nl>2013-06-12 02:07:28 +0400
commit393d33e7ea44a4410729e50303a6ad0d62558a8c (patch)
tree0ecf621b653f04a6e5e1113aa42caea90f64c362 /src/node_object_wrap.h
parent2dbc5ea1b449c08b9af4655af1fe875e124b386b (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.h13
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;
}
};