We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1822e3 commit 8f8c380Copy full SHA for 8f8c380
src/async_wrap.cc
@@ -347,8 +347,13 @@ void AsyncWrap::WeakCallback(const v8::WeakCallbackInfo<DestroyParam>& info) {
347
348
std::unique_ptr<DestroyParam> p{info.GetParameter()};
349
Local<Object> prop_bag = PersistentToLocal(info.GetIsolate(), p->propBag);
350
+ Local<Value> val;
351
+
352
+ if (!prop_bag->Get(p->env->context(), p->env->destroyed_string())
353
+ .ToLocal(&val)) {
354
+ return;
355
+ }
356
- Local<Value> val = prop_bag->Get(p->env->destroyed_string());
357
if (val->IsFalse()) {
358
AsyncWrap::EmitDestroy(p->env, p->asyncId);
359
}
0 commit comments