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

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

Issue 1816763002: OOPIF: Fix subframe back/forward after recreating FTNs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix AddOrUpdateEntry, add test Created 4 years, 8 months 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 bce9b8bd77b938b020d7933077766ea5fa139985..12cf5b7e9f004f6b5f899cc8ab77989b61e72d6a 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -434,17 +434,15 @@ bool NavigatorImpl::NavigateNewChildFrame(
if (!entry)
return false;
+ DCHECK_EQ(render_frame_host->frame_tree_node()
+ ->current_replication_state()
+ .unique_name,
+ unique_name);
alexmos 2016/04/06 17:14:22 Would we want to strengthen this to a CHECK at som
Charlie Reis 2016/04/12 16:25:51 We avoid CHECKs on messages received from the rend
alexmos 2016/04/12 18:55:40 Acknowledged.
FrameNavigationEntry* frame_entry =
- entry->GetFrameEntryByUniqueName(unique_name);
+ entry->GetFrameEntry(render_frame_host->frame_tree_node());
if (!frame_entry)
return false;
- // Update the FrameNavigationEntry's FrameTreeNode ID (which is currently the
- // ID of the old FrameTreeNode that no longer exists) to be the ID of the
- // newly created frame.
- frame_entry->set_frame_tree_node_id(
- render_frame_host->frame_tree_node()->frame_tree_node_id());
-
return NavigateToEntry(render_frame_host->frame_tree_node(), *frame_entry,
*entry, NavigationControllerImpl::NO_RELOAD, false,
false);
@@ -780,7 +778,7 @@ void NavigatorImpl::RequestTransferURL(
is_renderer_initiated, std::string(),
controller_->GetBrowserContext()));
}
- entry->AddOrUpdateFrameEntry(node, std::string(), -1, -1, nullptr, dest_url,
+ entry->AddOrUpdateFrameEntry(node, -1, -1, nullptr, dest_url,
referrer_to_use, PageState());
} else {
// Main frame case.

Powered by Google App Engine
This is Rietveld 408576698