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>
This commit is contained in:
parent
1419533df9
commit
66fd78e39d
@ -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…
x
Reference in New Issue
Block a user