From b88576689c340d36f0b1d96c1ca0e9151acf55f8 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 This commit adds promise_resolve to the list of callbacks mentioned in the comment. It also fixes a minor typo, every -> ever. --- 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();