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
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2020-04-03 00:43:20 +0300
committerMichaƫl Zasso <targos@protonmail.com>2020-04-11 11:06:00 +0300
commit055c5686ad0096d0c59f4e481102c5444061499f (patch)
treefd936a34fa2201cbeaa646b6e225e6921ae11b3a /src/env.cc
parent34074aa095d1c6a39fbaea7e2fb38c0321891913 (diff)
src,test: add regression test for nested Worker termination
This adds a regression test for terminating a Worker inside which another Worker is running. PR-URL: https://github.com/nodejs/node/pull/32623 Refs: https://github.com/nodejs/node/pull/32531 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'src/env.cc')
-rw-r--r--src/env.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/env.cc b/src/env.cc
index ec2661e68be..e866c24446f 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -978,6 +978,8 @@ void Environment::Exit(int exit_code) {
}
void Environment::stop_sub_worker_contexts() {
+ DCHECK_EQ(Isolate::GetCurrent(), isolate());
+
while (!sub_worker_contexts_.empty()) {
Worker* w = *sub_worker_contexts_.begin();
remove_sub_worker_context(w);