test: fix up weakref.cc after v8 api change
This commit is contained in:
parent
7349667467
commit
7bfcaa8f91
8
test/gc/node_modules/weak/src/weakref.cc
generated
vendored
8
test/gc/node_modules/weak/src/weakref.cc
generated
vendored
@ -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]));
|
||||
|
Loading…
x
Reference in New Issue
Block a user