We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6fdc5d9 commit 9437aaaCopy full SHA for 9437aaa
src/async_wrap.cc
@@ -359,8 +359,13 @@ void AsyncWrap::WeakCallback(const v8::WeakCallbackInfo<DestroyParam>& info) {
359
360
std::unique_ptr<DestroyParam> p{info.GetParameter()};
361
Local<Object> prop_bag = PersistentToLocal(info.GetIsolate(), p->propBag);
362
+ Local<Value> val;
363
+
364
+ if (!prop_bag->Get(p->env->context(), p->env->destroyed_string())
365
+ .ToLocal(&val)) {
366
+ return;
367
+ }
368
- Local<Value> val = prop_bag->Get(p->env->destroyed_string());
369
if (val->IsFalse()) {
370
AsyncWrap::EmitDestroy(p->env, p->asyncId);
371
}
0 commit comments