Skip to content

Commit

Permalink
fix: call node::Stop on exit (#25459)
Browse files Browse the repository at this point in the history
* fix: call node::Stop on exit

* also call Stop in node_main

* oop, we were already calling set_can_call_into_js(false)??

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
  • Loading branch information
trop[bot] and nornagon committed Sep 16, 2020
1 parent 51a35f8 commit 80efb6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion shell/app/node_main.cc
Expand Up @@ -284,7 +284,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();

Expand Down
1 change: 1 addition & 0 deletions shell/browser/electron_browser_main_parts.cc
Expand Up @@ -553,6 +553,7 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun() {
node_debugger_->Stop();
node_env_->env()->set_trace_sync_io(false);
js_env_->OnMessageLoopDestroying();
node::Stop(node_env_->env());
node_env_.reset();

ElectronBrowserContext::browser_context_map().clear();
Expand Down

0 comments on commit 80efb6d

Please sign in to comment.