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 <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
danbev authored and targos committed Jun 2, 2020
1 parent aca07f4 commit 7fd0519
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 @@ -391,9 +391,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 7fd0519

Please sign in to comment.