Index: Source/core/dom/DocumentInit.cpp |
diff --git a/Source/core/dom/DocumentInit.cpp b/Source/core/dom/DocumentInit.cpp |
index f6d74b297c792aa2ed76e6e3ee6788933ff2d4a5..8c508d4d27cc904ccd111e651b1aa630497dbe79 100644 |
--- a/Source/core/dom/DocumentInit.cpp |
+++ b/Source/core/dom/DocumentInit.cpp |
@@ -37,7 +37,8 @@ namespace WebCore { |
bool DocumentInit::shouldSetURL() const |
{ |
- return (m_frame && m_frame->ownerElement()) || !m_url.isEmpty(); |
+ Frame* frame = frameForSecurityContext(); |
+ return (frame && frame->ownerElement()) || !m_url.isEmpty(); |
} |
bool DocumentInit::shouldTreatURLAsSrcdocDocument() const |