electron/patches/chromium/content_browser_main_loop.patch
Shelley Vohr e46446e7e4
chore: bump chromium to e836cbe709f3cd703f233de8eb6cc6ec99b72c9d (#27475)
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-02-09 12:16:21 -08:00

22 lines
951 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 electron::api::WebContents::ResetManagedWebContents.
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 5c3c8e53064c1f812ce16798737493de2d83e130..3b7e379c749244ce9d9af466ec45ffe66366d63c 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -1405,7 +1405,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
NOTREACHED();
#else
base::RunLoop run_loop;
- parts_->PreDefaultMainMessageLoopRun(run_loop.QuitClosure());
+ parts_->PreDefaultMainMessageLoopRun(run_loop.QuitWhenIdleClosure());
run_loop.Run();
#endif
}