Commit 895ea12c authored by Rakina Zata Amni's avatar Rakina Zata Amni Committed by Commit Bot

Reset NavigationRequests that have mismatched URLs on DidCommit

After crrev.com/c/1554760, the NavigationRequests are recreated if the
URL doesn't match. We should just reset the NavigationRequest instead of
moving it to same_document_navigation_request_.

Bug: 963396
Change-Id: Ib3a9d8c6432796bfa3b400ffd2dece760da1fb30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2494206
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: default avatarCamille Lamy <clamy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820230}
parent 19ba8fcb
......@@ -8496,7 +8496,11 @@ bool RenderFrameHostImpl::DidCommitNavigationInternal(
if (navigation_request &&
navigation_request->common_params().url != params->url &&
is_same_document_navigation) {
same_document_navigation_request_ = std::move(navigation_request);
// It's possible for the committed URL to differ from the one saved in
// NavigationRequest when the navigation is blocked or we passed an empty
// URL before (see crbug.com/963396). In this case, we should recreate the
// NavigationRequest with CreateNavigationRequestForCommit() further down.
navigation_request.reset();
}
// Set is loading to true now if it has not been set yet. This happens for
......
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