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 <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
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

Lines changed: 2 additions & 0 deletions
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)