From 66fd78e39d42e4cd8dd22d5ec3051332b40eed83 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 4b4a9b9f6cbba0..86759bc62c63b4 100644 --- a/src/async-wrap.cc +++ b/src/async-wrap.cc @@ -645,6 +645,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.