diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-03-29 15:07:00 +0200 |
---|---|---|
committer | Beth Griggs <Bethany.Griggs@uk.ibm.com> | 2020-04-07 16:25:12 +0100 |
commit | d05080d00102ab2d55a63eb2e0ea201c0159c4bf (patch) | |
tree | 71b2415d992e5193e1a28f11876c1042c204b2b8 /src/api | |
parent | e93503be832ba89748698ac465c34c3f0bcea6ae (diff) | |
download | node-new-d05080d00102ab2d55a63eb2e0ea201c0159c4bf.tar.gz |
embedding: make Stop() stop Workers
This makes sense given that terminating execution of the parent thread
this way likely also is supposed to stop all running Worker threads
spawned by it.
PR-URL: https://github.com/nodejs/node/pull/32531
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/environment.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/api/environment.cc b/src/api/environment.cc index e5d4b27e67..857506013f 100644 --- a/src/api/environment.cc +++ b/src/api/environment.cc @@ -725,8 +725,7 @@ ThreadId AllocateEnvironmentThreadId() { } void DefaultProcessExitHandler(Environment* env, int exit_code) { - env->set_can_call_into_js(false); - env->stop_sub_worker_contexts(); + Stop(env); DisposePlatform(); exit(exit_code); } |