Skip to content

Commit

Permalink
async_hooks: CHECK that resource is not empty
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
addaleax committed Aug 10, 2017
1 parent 1419533 commit 66fd78e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/async-wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,8 @@ void AsyncWrap::EmitAsyncInit(Environment* env,
Local<String> type,
double async_id,
double trigger_id) {
CHECK(!object.IsEmpty());
CHECK(!type.IsEmpty());
AsyncHooks* async_hooks = env->async_hooks();

// Nothing to execute, so can continue normally.
Expand Down

0 comments on commit 66fd78e

Please sign in to comment.