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

Unified Diff: third_party/WebKit/Source/core/page/FrameTree.cpp

Issue 2317203002: Avoid mutating frame unique name after first real commit. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/navigation/rename-subframe-goback-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/FrameTree.cpp
diff --git a/third_party/WebKit/Source/core/page/FrameTree.cpp b/third_party/WebKit/Source/core/page/FrameTree.cpp
index 5742191df101fb60dd771901f535fb76bb6c1d27..a159fa79dae11044d36c7fe500345db4e90a212e 100644
--- a/third_party/WebKit/Source/core/page/FrameTree.cpp
+++ b/third_party/WebKit/Source/core/page/FrameTree.cpp
@@ -73,6 +73,14 @@ void FrameTree::setName(const AtomicString& name)
m_name = name;
+ // https://crbug.com/607205: Make sure m_uniqueName doesn't change after
+ // initial navigation - session history depends on this.
+ if (m_thisFrame->isLocalFrame()) {
dcheng 2016/09/07 19:54:13 This check is redundant (see the DCHECK on line 59
Łukasz Anforowicz 2016/09/09 16:21:38 Done.
+ LocalFrame* localFrame = toLocalFrame(m_thisFrame);
+ if (localFrame->loader().stateMachine()->committedFirstRealDocumentLoad())
+ return;
+ }
+
// Remove our old frame name so it's not considered in calculateUniqueNameForChildFrame
// and appendUniqueSuffix calls below.
m_uniqueName = AtomicString();
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/navigation/rename-subframe-goback-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698