Skip to content

Commit 34ee31f

Browse files
addaleaxMatt Loring
authored and
Matt Loring
committed
add CHECK_NE() (trevnorris review)
1 parent 5717d75 commit 34ee31f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/async-wrap.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ static void PromiseHook(PromiseHookType type, Local<Promise> promise,
299299
promise->Get(context, env->promise_async_id()).ToLocalChecked();
300300
PromiseWrap* wrap =
301301
static_cast<PromiseWrap*>(external_wrap.As<v8::External>()->Value());
302+
CHECK_NE(wrap, nullptr);
302303
if (type == PromiseHookType::kBefore) {
303304
PreCallbackExecution(wrap);
304305
} else if (type == PromiseHookType::kAfter) {

0 commit comments

Comments
 (0)