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

Unified Diff: Source/core/html/HTMLFrameElementBase.cpp

Issue 221673003: Defer iframe JavaScript URL evaluation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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: Source/core/html/HTMLFrameElementBase.cpp
diff --git a/Source/core/html/HTMLFrameElementBase.cpp b/Source/core/html/HTMLFrameElementBase.cpp
index 87abc68c5568c666593a5d08c5e14ac1973c4da4..ee26148c26eb3534ef12b49dd3fc0418df6cc35a 100644
--- a/Source/core/html/HTMLFrameElementBase.cpp
+++ b/Source/core/html/HTMLFrameElementBase.cpp
@@ -31,6 +31,7 @@
#include "core/dom/Document.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
+#include "core/html/HTMLFrameJavaScriptURLOpener.h"
#include "core/html/parser/HTMLParserIdioms.h"
#include "core/loader/FrameLoader.h"
#include "core/page/FocusController.h"
@@ -151,7 +152,12 @@ void HTMLFrameElementBase::didNotifySubtreeInsertionsToDocument()
if (!SubframeLoadingDisabler::canLoadFrame(*this))
return;
- setNameAndOpenURL();
+ if (!protocolIsJavaScript(m_URL)) {
+ setNameAndOpenURL();
+ return;
+ }
+
+ HTMLFrameJavaScriptURLOpener::instance().request(this);
}
void HTMLFrameElementBase::attach(const AttachContext& context)

Powered by Google App Engine
This is Rietveld 408576698