Skip to content

Commit 66fd78e

Browse files
committed
async_hooks: CHECK that resource is not empty
This condition can be triggered through the public C++ embedder API. PR-URL: #14694 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent 1419533 commit 66fd78e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/async-wrap.cc

+2
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,8 @@ void AsyncWrap::EmitAsyncInit(Environment* env,
645645
Local<String> type,
646646
double async_id,
647647
double trigger_id) {
648+
CHECK(!object.IsEmpty());
649+
CHECK(!type.IsEmpty());
648650
AsyncHooks* async_hooks = env->async_hooks();
649651

650652
// Nothing to execute, so can continue normally.

0 commit comments

Comments
 (0)