electron/patches/common/chromium/content_browser_main_loop.patch
2019-02-14 23:57:58 +05:30

22 lines
938 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 a69d86afff84745e1b0cd85ae6eec48f10127ab5..0782f0e890ee86c4f051e3102e3d20bee8276479 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -1543,7 +1543,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
}
base::RunLoop run_loop;
- parts_->PreDefaultMainMessageLoopRun(run_loop.QuitClosure());
+ parts_->PreDefaultMainMessageLoopRun(run_loop.QuitWhenIdleClosure());
run_loop.Run();
#endif
}