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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 1942273002: Crash on channel error in single-process mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « content/renderer/render_thread_impl.h ('k') | 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 e2a9a8f0e1d33b425f6f23af463cca1c26d3896f..3214132db6a6b805ddba6959662ccac043d4d1e1 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1628,6 +1628,16 @@ void RenderThreadImpl::DoNotNotifyWebKitOfModalLoop() {
notify_webkit_of_modal_loop_ = false;
}
+void RenderThreadImpl::OnChannelError() {
+ // In single-process mode, the renderer can't be restarted after shutdown.
+ // So, if we get a channel error, crash the whole process right now to get a
+ // more informative stack, since we will otherwise just crash later when we
+ // try to restart it.
+ CHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSingleProcess));
+ ChildThreadImpl::OnChannelError();
+}
+
bool RenderThreadImpl::OnControlMessageReceived(const IPC::Message& msg) {
base::ObserverListBase<RenderThreadObserver>::Iterator it(&observers_);
RenderThreadObserver* observer;
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698