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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 883503003: Remove CHECKs from WebContentsImpl::OnDocumentLoadedInFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index ff003ddb3c808f2ecd7ce45abb86207620d9d2bd..9b443fc7460fcff4e7e2f93154fd09989d991012 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2763,8 +2763,16 @@ void WebContentsImpl::OnDidRunInsecureContent(
}
void WebContentsImpl::OnDocumentLoadedInFrame() {
- CHECK(render_frame_message_source_);
- CHECK(!render_view_message_source_);
+ if (!render_frame_message_source_) {
+ RecordAction(base::UserMetricsAction("BadMessageTerminate_RVD2"));
Charlie Reis 2015/01/27 00:18:03 Why RVD2? I thought we usually abbreviated the cl
nasko 2015/01/27 01:29:37 Fixed both. I forgot it on the first iteration.
+ // TODO(nasko): With --site-per-process, subframes can be in a different
+ // process from the main frame and this will kill the wrong process.
+ // Once RenderViewHost is not used to route messages, this should not
+ // happen.
Charlie Reis 2015/01/27 00:18:03 I don't think this TODO is necessary. "!render_fr
nasko 2015/01/27 01:29:36 Done.
+ GetRenderProcessHost()->ReceivedBadMessage();
+ return;
+ }
+
RenderFrameHostImpl* rfh =
static_cast<RenderFrameHostImpl*>(render_frame_message_source_);
FOR_EACH_OBSERVER(
« 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