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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2528813002: Fix Self-Referencing OOPIF Infinite Loop (Closed)
Patch Set: refactor allowedToLoadFrame conditional Created 3 years, 10 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/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index a54f1e1f039db634ac70a05e9eb21ba8d9442c89..1eea7f3e818e95d546c51c379fece1e8e326aa87 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -805,27 +805,6 @@ EphemeralRange LocalFrame::rangeForPoint(const IntPoint& framePoint) {
return EphemeralRange();
}
-bool LocalFrame::isURLAllowed(const KURL& url) const {
- // Exempt about: URLs from self-reference check.
- if (url.protocolIsAbout())
- return true;
-
- // We allow one level of self-reference because some sites depend on that,
- // but we don't allow more than one.
- bool foundSelfReference = false;
- for (const Frame* frame = this; frame; frame = frame->tree().parent()) {
- if (!frame->isLocalFrame())
- continue;
- if (equalIgnoringFragmentIdentifier(toLocalFrame(frame)->document()->url(),
- url)) {
- if (foundSelfReference)
- return false;
- foundSelfReference = true;
- }
- }
- return true;
-}
-
bool LocalFrame::shouldReuseDefaultView(const KURL& url) const {
// Secure transitions can only happen when navigating from the initial empty
// document.
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('k') | third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698