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

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

Issue 2907663004: FrameTree::Find only searches relative to local frames. (Closed)
Patch Set: . 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 cb492e67a9a8b82249eb68df941bd2440ceac657..0f045e016e96780dfc1b53d9d08944ae641d65ad 100644
--- a/third_party/WebKit/Source/core/page/FrameTree.cpp
+++ b/third_party/WebKit/Source/core/page/FrameTree.cpp
@@ -149,6 +149,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_;

Powered by Google App Engine
This is Rietveld 408576698