diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-05-13 06:46:52 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-05-13 06:46:55 +0200 |
commit | 69572a3965825ecead1d5ee2cfabe3a5c981fa15 (patch) | |
tree | 7a9d5a1b3ba98029b1a94062ac41c3e1c2c55d2e /test/gc/node_modules | |
parent | 7bfcaa8f9117ac1923644346b33a8c493b895a7f (diff) | |
download | node-new-69572a3965825ecead1d5ee2cfabe3a5c981fa15.tar.gz |
test: fix up weakref.cc deprecation warnings
Diffstat (limited to 'test/gc/node_modules')
-rw-r--r-- | test/gc/node_modules/weak/src/weakref.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/gc/node_modules/weak/src/weakref.cc b/test/gc/node_modules/weak/src/weakref.cc index 6906142860..8f2c22d794 100644 --- a/test/gc/node_modules/weak/src/weakref.cc +++ b/test/gc/node_modules/weak/src/weakref.cc @@ -181,10 +181,13 @@ Handle<Value> Create(const Arguments& args) { proxy_container *cont = (proxy_container *) malloc(sizeof(proxy_container)); - cont->target = Persistent<Object>::New(args[0]->ToObject()); - cont->callbacks = Persistent<Array>::New(Array::New()); + cont->target = Persistent<Object>::New(Isolate::GetCurrent(), + args[0]->ToObject()); + cont->callbacks = Persistent<Array>::New(Isolate::GetCurrent(), + Array::New()); - cont->proxy = Persistent<Object>::New(proxyClass->NewInstance()); + cont->proxy = Persistent<Object>::New(Isolate::GetCurrent(), + proxyClass->NewInstance()); cont->proxy->SetAlignedPointerInInternalField(0, cont); cont->target.MakeWeak(Isolate::GetCurrent(), @@ -289,7 +292,8 @@ Handle<Value> Callbacks(const Arguments& args) { void Initialize(Handle<Object> target) { HandleScope scope; - proxyClass = Persistent<ObjectTemplate>::New(ObjectTemplate::New()); + proxyClass = Persistent<ObjectTemplate>::New(Isolate::GetCurrent(), + ObjectTemplate::New()); proxyClass->SetNamedPropertyHandler(WeakNamedPropertyGetter, WeakNamedPropertySetter, WeakNamedPropertyQuery, |