Commit 766c90de authored by Rakina Zata Amni's avatar Rakina Zata Amni Committed by Commit Bot

Log crash keys for no-navigation-request-at-commit renderer kills

Log some relevant info to make sure crashes reported are legitimate
renderer kills.

Bug: 1133115
Change-Id: I8fa1f6393fdf1db64f242d1d881e9f758410e0b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2558118Reviewed-by: default avatarNasko Oskov <nasko@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831238}
parent ce3b8638
...@@ -8508,6 +8508,9 @@ bool RenderFrameHostImpl::DidCommitNavigationInternal( ...@@ -8508,6 +8508,9 @@ bool RenderFrameHostImpl::DidCommitNavigationInternal(
// FrameHostMsg_DidCommitProvisionalLoad_Params at all. // FrameHostMsg_DidCommitProvisionalLoad_Params at all.
if (!navigation_request && !is_initial_empty_commit && if (!navigation_request && !is_initial_empty_commit &&
!is_same_document_navigation) { !is_same_document_navigation) {
LogCannotCommitUrlCrashKeys(params->url, is_same_document_navigation,
navigation_request.get());
bad_message::ReceivedBadMessage( bad_message::ReceivedBadMessage(
GetProcess(), GetProcess(),
bad_message::RFH_NO_MATCHING_NAVIGATION_REQUEST_ON_COMMIT); bad_message::RFH_NO_MATCHING_NAVIGATION_REQUEST_ON_COMMIT);
...@@ -9257,6 +9260,12 @@ void RenderFrameHostImpl::LogCannotCommitUrlCrashKeys( ...@@ -9257,6 +9260,12 @@ void RenderFrameHostImpl::LogCannotCommitUrlCrashKeys(
// Temporary instrumentation to debug the root cause of renderer process // Temporary instrumentation to debug the root cause of renderer process
// terminations. See https://crbug.com/931895. // terminations. See https://crbug.com/931895.
auto bool_to_crash_key = [](bool b) { return b ? "true" : "false"; }; auto bool_to_crash_key = [](bool b) { return b ? "true" : "false"; };
base::debug::SetCrashKeyString(
base::debug::AllocateCrashKeyString("navigation_url",
base::debug::CrashKeySize::Size256),
url.spec());
base::debug::SetCrashKeyString( base::debug::SetCrashKeyString(
base::debug::AllocateCrashKeyString("is_same_document", base::debug::AllocateCrashKeyString("is_same_document",
base::debug::CrashKeySize::Size32), base::debug::CrashKeySize::Size32),
......
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