Skip to content

Commit

Permalink
Navigation: Adding Crash Keys in RenderFrameImpl.
Browse files Browse the repository at this point in the history
Adding extra information for a url/origin mismatch troubleshooting.
See bug for details.

Bug: 824649
Change-Id: I3044337d5895759140a7b80d964ffbe6e067739d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1611819
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662005}
  • Loading branch information
hemeryar authored and Commit Bot committed May 22, 2019
1 parent 9c1ab16 commit 8abfe92
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions content/renderer/render_frame_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5917,8 +5917,18 @@ RenderFrameImpl::MakeDidCommitProvisionalLoadParams(
if (params->origin.scheme() != url::kFileScheme ||
!render_view_->GetWebkitPreferences()
.allow_universal_access_from_file_urls) {
CHECK(params->origin.IsSameOriginWith(url::Origin::Create(params->url)))
<< " url:" << params->url << " origin:" << params->origin;
if (!params->origin.IsSameOriginWith(url::Origin::Create(params->url))) {
base::debug::CrashKeyString* url = base::debug::AllocateCrashKeyString(
"mismatched_url", base::debug::CrashKeySize::Size256);
base::debug::CrashKeyString* origin =
base::debug::AllocateCrashKeyString(
"mismatched_origin", base::debug::CrashKeySize::Size256);
base::debug::ScopedCrashKeyString(url,
params->url.possibly_invalid_spec());
base::debug::ScopedCrashKeyString(origin,
params->origin.GetDebugString());
CHECK(false) << " url:" << params->url << " origin:" << params->origin;
}
}
}
params->request_id = internal_data->request_id();
Expand Down

0 comments on commit 8abfe92

Please sign in to comment.