mirror of https://github.com/nodejs/node.git
src: fix Get() usage in async_wrap.cc
PR-URL: https://github.com/nodejs/node/pull/24060 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>pull/24060/head
parent
c3809ffc24
commit
312baacd93
|
@ -347,8 +347,13 @@ void AsyncWrap::WeakCallback(const v8::WeakCallbackInfo<DestroyParam>& info) {
|
|||
|
||||
std::unique_ptr<DestroyParam> p{info.GetParameter()};
|
||||
Local<Object> prop_bag = PersistentToLocal(info.GetIsolate(), p->propBag);
|
||||
Local<Value> val;
|
||||
|
||||
if (!prop_bag->Get(p->env->context(), p->env->destroyed_string())
|
||||
.ToLocal(&val)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Local<Value> val = prop_bag->Get(p->env->destroyed_string());
|
||||
if (val->IsFalse()) {
|
||||
AsyncWrap::EmitDestroy(p->env, p->asyncId);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue