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

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

Issue 2475693002: Do not reset NavigationHandle when navigating same-page (Closed)
Patch Set: Created 4 years, 1 month 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
Index: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index 09f927e3793d8cba56b48111f6d02953393357b6..3afe29f204ac6202465f5934c115cd57d81b63c7 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -511,7 +511,8 @@ bool NavigatorImpl::NavigateNewChildFrame(
void NavigatorImpl::DidNavigate(
RenderFrameHostImpl* render_frame_host,
- const FrameHostMsg_DidCommitProvisionalLoad_Params& params) {
+ const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
+ std::unique_ptr<NavigationHandleImpl> navigation_handle) {
FrameTree* frame_tree = render_frame_host->frame_tree_node()->frame_tree();
bool oopifs_possible = SiteIsolationPolicy::AreCrossProcessFramesPossible();
@@ -618,7 +619,8 @@ void NavigatorImpl::DidNavigate(
int old_entry_count = controller_->GetEntryCount();
LoadCommittedDetails details;
bool did_navigate = controller_->RendererDidNavigate(
- render_frame_host, params, &details, is_navigation_within_page);
+ render_frame_host, params, &details, is_navigation_within_page,
+ navigation_handle.get());
// If the history length and/or offset changed, update other renderers in the
// FrameTree.
@@ -667,9 +669,9 @@ void NavigatorImpl::DidNavigate(
delegate_->DidCommitProvisionalLoad(render_frame_host,
params.url,
transition_type);
- render_frame_host->navigation_handle()->DidCommitNavigation(
- params, is_navigation_within_page, render_frame_host);
- render_frame_host->SetNavigationHandle(nullptr);
Charlie Reis 2016/11/03 22:02:22 Sanity check: This is handled by FindNavigationHan
clamy 2016/11/04 14:18:21 Yes in the cases where we need to reset it. FindNa
+ navigation_handle->DidCommitNavigation(params, is_navigation_within_page,
+ render_frame_host);
+ navigation_handle.reset();
}
if (!did_navigate)

Powered by Google App Engine
This is Rietveld 408576698