Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2020-05-16 12:39:53 +0300
committerRuben Bridgewater <ruben@bridgewater.de>2020-05-23 19:59:25 +0300
commit8ddb6aa88694f4a5a2a05a46f66508c683b850d2 (patch)
tree6e06017fe67d54bb0377e1c39b95031fb854a1e8 /src/api
parenta3f47b111499416e5d164c5957af4f504a9e3c48 (diff)
src: remove BeforeExit callback list
It obscures the fact that there is only a single BeforeExit action. Just call that statically from `EmitBeforeExit()`. PR-URL: https://github.com/nodejs/node/pull/33386 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/api')
-rw-r--r--src/api/hooks.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/api/hooks.cc b/src/api/hooks.cc
index 2dd0cc994ea..d0113670457 100644
--- a/src/api/hooks.cc
+++ b/src/api/hooks.cc
@@ -30,7 +30,10 @@ void AtExit(Environment* env, void (*cb)(void* arg), void* arg) {
}
void EmitBeforeExit(Environment* env) {
- env->RunBeforeExitCallbacks();
+ TraceEventScope trace_scope(TRACING_CATEGORY_NODE1(environment),
+ "BeforeExit", env);
+ if (!env->destroy_async_id_list()->empty())
+ AsyncWrap::DestroyAsyncIdsCallback(env);
HandleScope handle_scope(env->isolate());
Context::Scope context_scope(env->context());