mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
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:
1 file changed
+2
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user