Index: WebCore/html/HTMLFrameElementBase.cpp |
=================================================================== |
--- WebCore/html/HTMLFrameElementBase.cpp (revision 48155) |
+++ WebCore/html/HTMLFrameElementBase.cpp (working copy) |
@@ -34,6 +34,7 @@ |
#include "FrameView.h" |
#include "HTMLFrameSetElement.h" |
#include "HTMLNames.h" |
+#include "ScriptController.h" |
#include "ScriptEventListener.h" |
#include "KURL.h" |
#include "MappedAttribute.h" |
@@ -64,6 +65,12 @@ |
const KURL& completeURL = document()->completeURL(m_URL); |
+ if (protocolIsJavaScript(completeURL)) { |
+ Document* contentDoc = this->contentDocument(); |
+ if (contentDoc && !ScriptController::canAccessFromCurrentOrigin(contentDoc->frame())) |
+ return false; |
+ } |
+ |
// Don't allow more than 200 total frames in a set. This seems |
// like a reasonable upper bound, and otherwise mutually recursive |
// frameset pages can quickly bring the program to its knees with |