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

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

Issue 2907663004: FrameTree::Find only searches relative to local frames. (Closed)
Patch Set: Rebasing... Created 3 years, 7 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: 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 9480da093754bb8bf1b0bd857573f8a1d615c4a1..ea7c652ccce64d866aab51213ee5e1270efed022 100644
--- a/third_party/WebKit/Source/core/page/FrameTree.cpp
+++ b/third_party/WebKit/Source/core/page/FrameTree.cpp
@@ -155,6 +155,9 @@ unsigned FrameTree::ChildCount() const {
}
Frame* FrameTree::Find(const AtomicString& name) const {
+ // Named frame lookup should always be relative to a local frame.
+ DCHECK(this_frame_->IsLocalFrame());
+
if (EqualIgnoringASCIICase(name, "_self") ||
EqualIgnoringASCIICase(name, "_current") || name.IsEmpty())
return this_frame_;
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698