Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp |
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp |
index c04ce6ba981bb5fbdd1c7c76256e19bd0460672b..2fadca769a607a25c88b3cbbda8ef9740596ce65 100644 |
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp |
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp |
@@ -329,7 +329,7 @@ void FrameLoader::replaceDocumentWhileExecutingJavaScriptURL(const String& sourc |
// Prepare a DocumentInit before clearing the frame, because it may need to |
// inherit an aliased security context. |
- DocumentInit init(m_frame->document()->url(), m_frame); |
+ DocumentInit init(ownerDocument, m_frame->document()->url(), m_frame); |
init.withNewRegistrationContext(); |
stopAllLoaders(); |
@@ -347,7 +347,7 @@ void FrameLoader::replaceDocumentWhileExecutingJavaScriptURL(const String& sourc |
return; |
client()->transitionToCommittedForNewPage(); |
- documentLoader->replaceDocumentWhileExecutingJavaScriptURL(init, source, ownerDocument); |
+ documentLoader->replaceDocumentWhileExecutingJavaScriptURL(init, source); |
} |
void FrameLoader::receivedMainResourceRedirect(const KURL& newURL) |