Browse Source

async_hooks: CHECK that resource is not empty

This condition can be triggered through the public C++ embedder API.

PR-URL: https://github.com/nodejs/node/pull/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>
v6
Anna Henningsen 8 years ago
parent
commit
66fd78e39d
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  1. 2
      src/async-wrap.cc

2
src/async-wrap.cc

@ -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.

Loading…
Cancel
Save