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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1171973004: Ensure the new navigation classifier works in the real world. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 6 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/browser/frame_host/render_frame_host_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 0f5b5ce80f5c5d90e1363b53e76ea2395815b71d..8ea65c35412c043dcdf6d1b815c79b3aadcf178c 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -788,11 +788,15 @@ void RenderFrameHostImpl::OnDidFailLoadWithError(
void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
// Read the parameters out of the IPC message directly to avoid making another
// copy when we filter the URLs.
+ ++commit_count_;
base::PickleIterator iter(msg);
FrameHostMsg_DidCommitProvisionalLoad_Params validated_params;
if (!IPC::ParamTraits<FrameHostMsg_DidCommitProvisionalLoad_Params>::
- Read(&msg, &iter, &validated_params))
+ Read(&msg, &iter, &validated_params)) {
+ base::debug::SetCrashKeyValue("369661-earlyreturn",
+ CommitCountString() + "/badipc");
return;
+ }
TRACE_EVENT1("navigation", "RenderFrameHostImpl::OnDidCommitProvisionalLoad",
"url", validated_params.url.possibly_invalid_spec());
@@ -811,6 +815,8 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
!GetParent()) {
base::TimeTicks approx_renderer_start_time = send_before_unload_start_time_;
OnBeforeUnloadACK(true, approx_renderer_start_time, base::TimeTicks::Now());
+ base::debug::SetCrashKeyValue("369661-earlyreturn",
+ CommitCountString() + "/beforeunloadwait");
return;
}
@@ -819,8 +825,11 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
// unload request. It will either respond to the unload request soon or our
// timer will expire. Either way, we should ignore this message, because we
// have already committed to closing this renderer.
- if (IsWaitingForUnloadACK())
+ if (IsWaitingForUnloadACK()) {
+ base::debug::SetCrashKeyValue("369661-earlyreturn",
+ CommitCountString() + "/unloadwait");
return;
+ }
if (validated_params.report_type ==
FrameMsg_UILoadMetricsReportType::REPORT_LINK) {
@@ -872,6 +881,8 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
validated_params.page_state)) {
bad_message::ReceivedBadMessage(
GetProcess(), bad_message::RFH_CAN_ACCESS_FILES_OF_PAGE_STATE);
+ base::debug::SetCrashKeyValue("369661-earlyreturn",
+ CommitCountString() + "/fileaccess");
return;
}
@@ -2074,4 +2085,11 @@ void RenderFrameHostImpl::UpdatePermissionsForNavigation(
}
}
+std::string RenderFrameHostImpl::CommitCountString() {
+ std::string result = base::Int64ToString(reinterpret_cast<int64_t>(this));
+ result += "/";
+ result += base::IntToString(commit_count_);
+ return result;
+}
+
} // namespace content
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698