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

Issue 2191543003: Remove existing FrameNavigationEntry when new named frame is added. (Closed)

Created:
4 years, 4 months ago by nasko
Modified:
4 years, 4 months ago
Reviewers:
Charlie Reis
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove existing FrameNavigationEntry when new named frame is added. FrameTreeNode is identified by a unique frame name, which allows us to look up FrameNavigationEntry objects in NavigationEntry. However, when a frame is removed from the page, the corresponding FrameNavigationEntry is not removed. This is done intentionally to support back-forward navigations in subframes and more intuitive UX on tab restore. This behavior allows for more than one FrameNavigationEntry to exist in the NavigationEntry with the same unique name, which can lead to corruption of session history data. This CL changes the behavior to ensure that when a new frame is added to the page, any existing entries with the same unique name are deleted to avoid conflicts. BUG=628677 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/03ecfad9cb9219e03c87312150aaa5dd89eebc32 Cr-Commit-Position: refs/heads/master@{#409107}

Patch Set 1 #

Total comments: 33

Patch Set 2 : New implementation of FNE clearing. More work needed. #

Total comments: 4

Patch Set 3 : Fixes for all review comments in PS[1-2]. #

Patch Set 4 : Rebase to fix conflict #

Total comments: 18

Patch Set 5 : Comments addressed and refactored on top of TreeNode::parent. #

Total comments: 10

Patch Set 6 : Fixes for InSameTreePosition and nits. #

Patch Set 7 : Remove NOTREACHED as there are other issues it caught. #

Total comments: 1

Patch Set 8 : Remove extra pointer in test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+267 lines, -0 lines) Patch
M content/browser/frame_host/frame_tree.cc View 1 2 3 4 2 chunks +11 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl_browsertest.cc View 1 2 3 4 5 6 7 2 chunks +190 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_entry_impl.h View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_entry_impl.cc View 1 2 3 4 5 2 chunks +60 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (21 generated)
nasko
Hey Charlie, I finally have a CL to fix the PageState corruption bug we've been ...
4 years, 4 months ago (2016-07-27 21:45:10 UTC) #5
Charlie Reis
Great-- looks like a good start. Haven't looked at the test failures, so we might ...
4 years, 4 months ago (2016-07-27 22:48:28 UTC) #8
Charlie Reis
Thanks! A few thoughts on PS2 as you go. https://codereview.chromium.org/2191543003/diff/20001/content/browser/frame_host/navigation_entry_impl.cc File content/browser/frame_host/navigation_entry_impl.cc (right): https://codereview.chromium.org/2191543003/diff/20001/content/browser/frame_host/navigation_entry_impl.cc#newcode811 content/browser/frame_host/navigation_entry_impl.cc:811: ...
4 years, 4 months ago (2016-07-28 22:57:01 UTC) #11
nasko
https://codereview.chromium.org/2191543003/diff/1/content/browser/frame_host/frame_tree.cc File content/browser/frame_host/frame_tree.cc (right): https://codereview.chromium.org/2191543003/diff/1/content/browser/frame_host/frame_tree.cc#newcode18 content/browser/frame_host/frame_tree.cc:18: #include "content/browser/frame_host/navigation_entry_impl.h" On 2016/07/27 22:48:27, Charlie Reis wrote: > ...
4 years, 4 months ago (2016-07-29 15:52:22 UTC) #14
Charlie Reis
Thanks! It's always fun trying to shuffle the code around until we find something that ...
4 years, 4 months ago (2016-07-29 17:21:36 UTC) #23
nasko
Another round ready to go. There are few tests that fail in --site-per-process or PlzNavigate ...
4 years, 4 months ago (2016-08-01 20:42:16 UTC) #24
Charlie Reis
Great. A few nits and one possible bug below. https://codereview.chromium.org/2191543003/diff/1/content/browser/frame_host/navigation_controller_impl_browsertest.cc File content/browser/frame_host/navigation_controller_impl_browsertest.cc (right): https://codereview.chromium.org/2191543003/diff/1/content/browser/frame_host/navigation_controller_impl_browsertest.cc#newcode5449 content/browser/frame_host/navigation_controller_impl_browsertest.cc:5449: ...
4 years, 4 months ago (2016-08-01 21:04:26 UTC) #25
nasko
https://codereview.chromium.org/2191543003/diff/80001/content/browser/frame_host/navigation_controller_impl_browsertest.cc File content/browser/frame_host/navigation_controller_impl_browsertest.cc (right): https://codereview.chromium.org/2191543003/diff/80001/content/browser/frame_host/navigation_controller_impl_browsertest.cc#newcode5508 content/browser/frame_host/navigation_controller_impl_browsertest.cc:5508: // name. It is similar to EnsureFrameNavigationEntriesClearedOnConflict, but On ...
4 years, 4 months ago (2016-08-01 23:05:19 UTC) #26
nasko
Ready for another round of reviews. Just the NOTREACHED removed in the latest patchset.
4 years, 4 months ago (2016-08-01 23:18:37 UTC) #27
Charlie Reis
Thanks! LGTM. I'm ok with delaying the NOTREACHED until we fix the replace case. https://codereview.chromium.org/2191543003/diff/120001/content/browser/frame_host/navigation_controller_impl_browsertest.cc ...
4 years, 4 months ago (2016-08-01 23:32:12 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2191543003/140001
4 years, 4 months ago (2016-08-01 23:35:33 UTC) #31
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 4 months ago (2016-08-02 00:54:27 UTC) #32
commit-bot: I haz the power
4 years, 4 months ago (2016-08-02 00:59:11 UTC) #34
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/03ecfad9cb9219e03c87312150aaa5dd89eebc32
Cr-Commit-Position: refs/heads/master@{#409107}

Powered by Google App Engine
This is Rietveld 408576698