From 7fd0519a917f307e559b366265f645042510f7ab Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 12 May 2020 14:31:46 +0200 Subject: [PATCH] src: add promise_resolve to SetupHooks comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds promise_resolve to the list of callbacks mentioned in the comment. It also fixes a minor typo, every -> ever. PR-URL: https://github.com/nodejs/node/pull/33365 Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Gerhard Stöbich Reviewed-By: James M Snell --- src/async_wrap.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/async_wrap.cc b/src/async_wrap.cc index 602b0e9f5d5841..f5a0def438c922 100644 --- a/src/async_wrap.cc +++ b/src/async_wrap.cc @@ -391,9 +391,10 @@ static void SetupHooks(const FunctionCallbackInfo& args) { CHECK(args[0]->IsObject()); - // All of init, before, after, destroy are supplied by async_hooks - // internally, so this should every only be called once. At which time all - // the functions should be set. Detect this by checking if init !IsEmpty(). + // All of init, before, after, destroy, and promise_resolve are supplied by + // async_hooks internally, so this should only ever be called once. At which + // time all the functions should be set. Detect this by checking if + // init !IsEmpty(). CHECK(env->async_hooks_init_function().IsEmpty()); Local fn_obj = args[0].As();