Setting window.name to the same name should NOT change unique name of the frame. |
||
Issue description
Fact: Recalculating unique name depends on state of other frames (and therefore calculating unique name for the same assigned name can give different result, depending on the sate of other frames).
Requirement: Setting window.name to the same value should not change unique name.
Currently this requirement is not met - with a carefully crafted layout test we can hit the DCHECK below:
content/browser/frame_host/frame_tree_node.cc:
void FrameTreeNode::SetFrameName(const std::string& name,
const std::string& unique_name) {
if (name == replication_state_.name) {
// |unique_name| shouldn't change unless |name| changes.
DCHECK_EQ(unique_name, replication_state_.unique_name);
return;
}
,
Jun 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d21ac9cb13ff2eac7f141bc04b3ed9d432c6f7ee commit d21ac9cb13ff2eac7f141bc04b3ed9d432c6f7ee Author: lukasza <lukasza@chromium.org> Date: Wed Jun 15 19:31:13 2016 Returning early when setting a frame name to the same name. BUG= 618813 Review-Url: https://codereview.chromium.org/2053903002 Cr-Commit-Position: refs/heads/master@{#399988} [add] https://crrev.com/d21ac9cb13ff2eac7f141bc04b3ed9d432c6f7ee/third_party/WebKit/LayoutTests/fast/frames/unique-name-set-same-name-expected.txt [add] https://crrev.com/d21ac9cb13ff2eac7f141bc04b3ed9d432c6f7ee/third_party/WebKit/LayoutTests/fast/frames/unique-name-set-same-name.html [modify] https://crrev.com/d21ac9cb13ff2eac7f141bc04b3ed9d432c6f7ee/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp [modify] https://crrev.com/d21ac9cb13ff2eac7f141bc04b3ed9d432c6f7ee/third_party/WebKit/Source/core/page/FrameTree.cpp
,
Jun 15 2016
,
Jun 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/543dc5fcb73056046770cf5489ace558811ff20d commit 543dc5fcb73056046770cf5489ace558811ff20d Author: lukasza <lukasza@chromium.org> Date: Fri Jun 17 20:54:03 2016 More aggressive DCHECKs for FrameTree::setName. BUG= 618813 Review-Url: https://codereview.chromium.org/2078643002 Cr-Commit-Position: refs/heads/master@{#400500} [modify] https://crrev.com/543dc5fcb73056046770cf5489ace558811ff20d/third_party/WebKit/Source/core/page/FrameTree.cpp |
||
►
Sign in to add a comment |
||
Comment 1 by lukasza@chromium.org
, Jun 9 2016