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.
  • Loading branch information
danbev committed May 15, 2020
1 parent 24bf1ad commit b885766
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/async_wrap.cc
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 b885766

Please sign in to comment.