Files
electron/patches/chromium/content_browser_main_loop.patch
2020-09-15 09:52:14 -07:00

23 lines
955 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Thu, 18 Oct 2018 17:07:42 -0700
Subject: content_browser_main_loop.patch
Pass idle quit closure for main message loop, so that pending tasks are
run before shutdown. This is required to cleanup WebContents asynchronously
in atom::CommonWebContentsDelegate::ResetManageWebContents.
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 40e29b8f369ee653c2b07ef48f1e3474f067fc70..e29026d38b219c5dc8e3b2673be3c30ec4386c30 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -1452,7 +1452,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
NOTREACHED();
#else
base::RunLoop run_loop;
- parts_->PreDefaultMainMessageLoopRun(run_loop.QuitClosure());
+ parts_->PreDefaultMainMessageLoopRun(run_loop.QuitWhenIdleClosure());
run_loop.Run();
#endif
}