mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user