Commit bea26525 authored by Fergal Daly's avatar Fergal Daly Committed by Commit Bot

Add DumpWithoutCrashing to try find navigations that later hit a CHECK.



Bug: 1146573
Change-Id: I695cecab30b60028a6003245da150b1a72089706
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2531334
Commit-Queue: Fergal Daly <fergal@chromium.org>
Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
Auto-Submit: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826624}
parent 74917d5b
......@@ -64,6 +64,7 @@
#include "content/browser/web_package/web_bundle_utils.h"
#include "content/common/appcache_interfaces.h"
#include "content/common/content_constants_internal.h"
#include "content/common/content_navigation_policy.h"
#include "content/common/frame_messages.h"
#include "content/common/navigation_params.h"
#include "content/common/navigation_params_mojom_traits.h"
......@@ -3177,6 +3178,22 @@ void NavigationRequest::AddOldPageInfoToCommitParamsIfNeeded() {
}
void NavigationRequest::CommitNavigation() {
// TODO(https://crbug.com/1146573): Remove this when the bug is closed.
RenderFrameHostManager* manager = frame_tree_node_->render_manager();
if (RenderFrameHost* speculative_rfh = manager->speculative_frame_host()) {
RenderFrameHost* current_rfh = manager->current_frame_host();
if (speculative_rfh != current_rfh &&
speculative_rfh->GetSiteInstance() == current_rfh->GetSiteInstance() &&
!ShouldCreateNewHostForSameSiteSubframe()) {
SCOPED_CRASH_KEY_STRING256(
CommitNavigation, OldSiteInstance,
current_rfh->GetSiteInstance()->GetSiteURL().spec());
SCOPED_CRASH_KEY_STRING256(
CommitNavigation, NewSiteInstance,
speculative_rfh->GetSiteInstance()->GetSiteURL().spec());
base::debug::DumpWithoutCrashing();
}
}
UpdateCommitNavigationParamsHistory();
DCHECK(NeedsUrlLoader() == !!response_head_ ||
(was_redirected_ && common_params_->url.IsAboutBlank()));
......
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