Skip to content

Commit

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

* Update node_main.cc
  • Loading branch information
nornagon committed Sep 17, 2020
1 parent c58b1fe commit afe59c5
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 @@ -152,7 +152,7 @@ int NodeMain(int argc, char* argv[]) {
env->set_trace_sync_io(false);

exit_code = node::EmitExit(env);
env->set_can_call_into_js(false);
node::Stop(env);
node::RunAtExit(env);

v8::Isolate* isolate = env->isolate();
Expand Down
1 change: 1 addition & 0 deletions shell/browser/electron_browser_main_parts.cc
Expand Up @@ -553,6 +553,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();

Expand Down

0 comments on commit afe59c5

Please sign in to comment.