Skip to content

Commit 459a95a

Browse files
authored
fix: call node::Stop on exit (electron#25430)
1 parent b1d8057 commit 459a95a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

shell/app/node_main.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ int NodeMain(int argc, char* argv[]) {
284284

285285
node::ResetStdio();
286286

287-
env->set_can_call_into_js(false);
287+
node::Stop(env);
288288
env->stop_sub_worker_contexts();
289289
env->RunCleanup();
290290

shell/browser/electron_browser_main_parts.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun() {
551551
node_debugger_->Stop();
552552
node_env_->env()->set_trace_sync_io(false);
553553
js_env_->OnMessageLoopDestroying();
554+
node::Stop(node_env_->env());
554555
node_env_.reset();
555556

556557
ElectronBrowserContext::browser_context_map().clear();

0 commit comments

Comments
 (0)