From 9883ba6ddd1d0d4d71e1c42eeb23fe3ec7aaf9e6 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 6722aa084b91b9..a3761b92a69130 100644 --- a/src/async_wrap.cc +++ b/src/async_wrap.cc @@ -301,9 +301,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();