Skip to content

Commit 7fd0519

Browse files
danbevtargos
authored andcommitted
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. PR-URL: #33365 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent aca07f4 commit 7fd0519

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/async_wrap.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,10 @@ static void SetupHooks(const FunctionCallbackInfo<Value>& args) {
391391

392392
CHECK(args[0]->IsObject());
393393

394-
// All of init, before, after, destroy are supplied by async_hooks
395-
// internally, so this should every only be called once. At which time all
396-
// the functions should be set. Detect this by checking if init !IsEmpty().
394+
// All of init, before, after, destroy, and promise_resolve are supplied by
395+
// async_hooks internally, so this should only ever be called once. At which
396+
// time all the functions should be set. Detect this by checking if
397+
// init !IsEmpty().
397398
CHECK(env->async_hooks_init_function().IsEmpty());
398399

399400
Local<Object> fn_obj = args[0].As<Object>();

0 commit comments

Comments
 (0)