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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2038633002: Renderers should immediately exit on failure to send an IPC to the browser. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index d17d359334c3533da6d5266502ddf2ba036d1260..6b75695fe2640eaef392247c0c50af36419dd9f0 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -974,6 +974,15 @@ bool RenderThreadImpl::Send(IPC::Message* msg) {
bool rv = ChildThreadImpl::Send(msg);
+ // In the fast shutdown path, the browser kills the IPC channel without
+ // informing the renderer. This means that any IPC message might fail. Either
+ // every sender of any IPC message needs to gracefully handle failures, or
+ // else the process needs to exit immediately. Since the renderer is no longer
+ // expected to have any user-visible effects, or make any persistent changes,
+ // exit immediately. https://crbug.com/615121.
+ if (!rv)
+ exit(EXIT_SUCCESS);
jam 2016/06/06 20:25:52 seems like this should match exit(0) in SuicideOnC
+
if (pumping_events) {
WebView::didExitModalLoop();
renderer_scheduler_->ResumeTimerQueue();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698