Skip to content

Commit

Permalink
src: add promise_resolve to SetupHooks comment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
danbev authored and codebytere committed Jun 9, 2020
1 parent 5d80576 commit 9883ba6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/async_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,10 @@ static void SetupHooks(const FunctionCallbackInfo<Value>& 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<Object> fn_obj = args[0].As<Object>();
Expand Down

0 comments on commit 9883ba6

Please sign in to comment.