fix: call node::Stop on exit (#25502)

This commit is contained in:
Jeremy Rose
2020-09-16 17:39:35 -07:00
committed by GitHub
parent a6ed6480d8
commit 489aafc1f9
2 changed files with 2 additions and 1 deletions

View File

@@ -233,7 +233,7 @@ int NodeMain(int argc, char* argv[]) {
node::ResetStdio();
env->set_can_call_into_js(false);
node::Stop(env);
env->stop_sub_worker_contexts();
env->RunCleanup();

View File

@@ -552,6 +552,7 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun() {
// invoke Node/V8 APIs inside them.
node_debugger_->Stop();
node_env_->env()->set_trace_sync_io(false);
node::Stop(node_env_->env());
node_env_.reset();
js_env_->OnMessageLoopDestroying();