From 2716b626b085bad6675852e6afa5bff629cbdbd3 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 8 Aug 2017 18:41:19 +0200 Subject: [PATCH] async_hooks: CHECK that resource is not empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: Refael Ackermann --- src/async-wrap.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/async-wrap.cc b/src/async-wrap.cc index f336a49307557c..b6588a20ad4071 100644 --- a/src/async-wrap.cc +++ b/src/async-wrap.cc @@ -646,6 +646,8 @@ void AsyncWrap::EmitAsyncInit(Environment* env, Local 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.