Skip to content
Permalink
Browse files
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>
  • Loading branch information
danbev authored and targos committed Jun 2, 2020
1 parent aca07f4 commit 7fd0519a917f307e559b366265f645042510f7ab
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/async_wrap.cc
@@ -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>();

0 comments on commit 7fd0519

Please sign in to comment.