From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: deepak1556 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 72693b82f5c4bcd0b5151e97820ec2de9662670c..dba51b8cdd420f8fecc45dff2a92a3110435c737 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc @@ -1413,7 +1413,7 @@ void BrowserMainLoop::MainMessageLoopRun() { NOTREACHED(); #else base::RunLoop run_loop; - parts_->PreDefaultMainMessageLoopRun(run_loop.QuitClosure()); + parts_->PreDefaultMainMessageLoopRun(run_loop.QuitWhenIdleClosure()); run_loop.Run(); #endif }