fix: stale renderer process on quit (#32888)

This commit is contained in:
Micha Hanselmann 2022-02-18 06:02:22 +01:00 committed by GitHub
parent 36e730da93
commit b1463d2da1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -458,7 +458,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() {