diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-05-13 06:45:05 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-05-13 06:45:05 +0200 |
commit | 7bfcaa8f9117ac1923644346b33a8c493b895a7f (patch) | |
tree | 573f43dd14e7bc3f8fa1150bd3251382a3c30d2b /test/gc/node_modules | |
parent | 7349667467f5acf9897513236b6bfba0111a53cf (diff) | |
download | node-new-7bfcaa8f9117ac1923644346b33a8c493b895a7f.tar.gz |
test: fix up weakref.cc after v8 api change
Diffstat (limited to 'test/gc/node_modules')
-rw-r--r-- | test/gc/node_modules/weak/src/weakref.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/gc/node_modules/weak/src/weakref.cc b/test/gc/node_modules/weak/src/weakref.cc index c2267a0709..6906142860 100644 --- a/test/gc/node_modules/weak/src/weakref.cc +++ b/test/gc/node_modules/weak/src/weakref.cc @@ -134,8 +134,8 @@ void AddCallback(Handle<Object> proxy, Handle<Function> callback) { } -void TargetCallback(Persistent<Value> target, void* arg) { - HandleScope scope; +void TargetCallback(Isolate* isolate, Persistent<Value> target, void* arg) { + HandleScope scope(isolate); assert(target.IsNearDeath()); @@ -187,7 +187,9 @@ Handle<Value> Create(const Arguments& args) { cont->proxy = Persistent<Object>::New(proxyClass->NewInstance()); cont->proxy->SetAlignedPointerInInternalField(0, cont); - cont->target.MakeWeak(cont, TargetCallback); + cont->target.MakeWeak(Isolate::GetCurrent(), + static_cast<void*>(cont), + TargetCallback); if (args.Length() >= 2) { AddCallback(cont->proxy, Handle<Function>::Cast(args[1])); |