Commit fbd03339 authored by nasko's avatar nasko Committed by Commit bot

Remove CHECKs from WebContentsImpl::OnDocumentLoadedInFrame

BUG=451932

Review URL: https://codereview.chromium.org/883503003

Cr-Commit-Position: refs/heads/master@{#313208}
parent 47131808
......@@ -2763,18 +2763,21 @@ 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_WC"));
GetRenderProcessHost()->ReceivedBadMessage();
return;
}
RenderFrameHostImpl* rfh =
static_cast<RenderFrameHostImpl*>(render_frame_message_source_);
FOR_EACH_OBSERVER(
WebContentsObserver, observers_, DocumentLoadedInFrame(rfh));
}
void WebContentsImpl::OnDidFinishLoad(
const GURL& url) {
void WebContentsImpl::OnDidFinishLoad(const GURL& url) {
if (!render_frame_message_source_) {
RecordAction(base::UserMetricsAction("BadMessageTerminate_RVD2"));
RecordAction(base::UserMetricsAction("BadMessageTerminate_WC"));
GetRenderProcessHost()->ReceivedBadMessage();
return;
}
......
......@@ -1259,6 +1259,15 @@ should be able to be added at any place in this file.
<description>Please enter the description of this user action.</description>
</action>
<action name="BadMessageTerminate_WC">
<owner>nasko@chromium.org</owner>
<description>
Indicates that a renderer process was terminated due to receiving a
malformed or unexpected IPC message. The process was terminated by the
WebContentsImpl class.
</description>
</action>
<action name="BadMessageTerminate_WPH">
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<description>Please enter the description of this user action.</description>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment