Skip to content

Commit 2716b62

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 5874272 commit 2716b62

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
@@ -646,6 +646,8 @@ void AsyncWrap::EmitAsyncInit(Environment* env,
646646
Local<String> type,
647647
double async_id,
648648
double trigger_id) {
649+
CHECK(!object.IsEmpty());
650+
CHECK(!type.IsEmpty());
649651
AsyncHooks* async_hooks = env->async_hooks();
650652

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

0 commit comments

Comments
 (0)