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 827cbb629e79a1ef1051c50fd41c00950a8d6f15..58960f49e4cc02f63baddc753ceb4480bd7b875f 100644 |
--- a/third_party/WebKit/Source/core/page/FrameTree.cpp |
+++ b/third_party/WebKit/Source/core/page/FrameTree.cpp |
@@ -54,6 +54,14 @@ FrameTree::~FrameTree() |
void FrameTree::setName(const AtomicString& name) |
{ |
+ // Do not recalculate m_uniqueName if there is no real change of m_name |
+ // *and* m_uniqueName has been already calculated. This ensures that |
+ // m_uniqueName stays the same in this scenario (regenerating m_uniqueName |
+ // can result in a different unique name value, because it depends on the |
+ // state of other frames in the frame tree). |
+ if (m_name == name && !m_uniqueName.isNull()) |
Łukasz Anforowicz
2016/06/10 00:06:57
This would be really easy to understand if this co
dcheng
2016/06/10 23:51:14
As we discussed, let's try to elaborate this comme
Łukasz Anforowicz
2016/06/14 23:58:42
Unless there is an assert, as in patchset #3? Hmm
|
+ return; |
+ |
m_name = name; |
// Remove our old frame name so it's not considered in calculateUniqueNameForChildFrame |