Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2182)

Unified Diff: content/renderer/renderer_main.cc

Issue 583043005: Pending tasks in a message loop should be deleted before shutting down Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« base/message_loop/message_loop.h ('K') | « base/message_loop/message_loop.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_main.cc
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc
index dbe40235cabb0ba7ed839f0017a08e2ae13e4570..a84030dc142de5914cd37a7f12347cfc5668a3b6 100644
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -230,6 +230,12 @@ int RendererMain(const MainFunctionParams& parameters) {
base::MessageLoop::current()->Run();
TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0);
}
+
+ // Since the destructors of the pending tasks can touch Blink objects,
+ // we need to make sure that all pending tasks are deleted before
+ // shutting down Blink (Blink is shut down in the RenderProcessImpl's
+ // destructor).
+ main_message_loop.DeletePendingTasks();
jamesr 2014/09/22 14:38:04 since you're deleting *all* pending tasks and not
haraken 2014/09/22 15:54:18 I'm not familiar with a message loop, but what's a
}
platform.PlatformUninitialize();
TRACE_EVENT_END_ETW("RendererMain", 0, "");
« base/message_loop/message_loop.h ('K') | « base/message_loop/message_loop.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698