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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Daniel Bevenius
2020-05-12 14:31:46 +02:00
parent a12a2d892f
commit b477ac83e6

View File

@@ -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>();