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

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

Issue 1906213003: OOPIF: Fix subframe back/forward after recreating FTNs (try #2). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up and add tests 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 e7d9de64b70c2b7ffff9a5e776cbfed02a8f311f..c953cfa262905d3df245a2003a781063d5accba0 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -440,17 +440,17 @@ bool NavigatorImpl::NavigateNewChildFrame(
if (!entry)
return false;
+ // TODO(creis): Remove unique_name from the IPC, now that we can rely on the
+ // replication state.
+ DCHECK_EQ(render_frame_host->frame_tree_node()
+ ->current_replication_state()
+ .unique_name,
+ unique_name);
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);

Powered by Google App Engine
This is Rietveld 408576698