diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-03-29 15:58:07 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2020-04-11 11:01:15 +0300 |
commit | 4acd7f4390f4c73c14532fef1cb3e56911604935 (patch) | |
tree | 07a427dfcce46cb704f602555b0033a31422c29a /src/env.cc | |
parent | 4e5271acfb3d8cfb416dab90e720c970aa9bd283 (diff) |
worker: do not emit 'exit' events during process.exit()
Do not emit `'exit'` events caused by recursively stopping all
running Workers from inside the `process.exit()` call.
PR-URL: https://github.com/nodejs/node/pull/32546
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src/env.cc')
-rw-r--r-- | src/env.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/env.cc b/src/env.cc index 5551f36c124..7fb5116b382 100644 --- a/src/env.cc +++ b/src/env.cc @@ -968,6 +968,7 @@ void Environment::Exit(int exit_code) { isolate(), stack_trace_limit(), StackTrace::kDetailed)); } if (is_main_thread()) { + set_can_call_into_js(false); stop_sub_worker_contexts(); DisposePlatform(); exit(exit_code); |