Browse Source

fix: stale renderer process on quit (#32968)

Co-authored-by: Micha Hanselmann <[email protected]>
trop[bot] 3 years ago
parent
commit
f57244d00d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      shell/browser/electron_browser_main_parts.cc

+ 2 - 1
shell/browser/electron_browser_main_parts.cc

@@ -463,7 +463,8 @@ void ElectronBrowserMainParts::WillRunMainMessageLoop(
     std::unique_ptr<base::RunLoop>& run_loop) {
   js_env_->OnMessageLoopCreated();
   exit_code_ = content::RESULT_CODE_NORMAL_EXIT;
-  Browser::Get()->SetMainMessageLoopQuitClosure(run_loop->QuitClosure());
+  Browser::Get()->SetMainMessageLoopQuitClosure(
+      run_loop->QuitWhenIdleClosure());
 }
 
 void ElectronBrowserMainParts::PostCreateMainMessageLoop() {