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

Unified Diff: Source/WebKit/chromium/src/WebFrameImpl.cpp

Issue 8223012: Merge 97087 - ScriptController::executeIfJavaScriptURL gets confused by synchronous frame loads (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 2 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
« no previous file with comments | « Source/WebCore/loader/DocumentWriter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebFrameImpl.cpp
===================================================================
--- Source/WebKit/chromium/src/WebFrameImpl.cpp (revision 97088)
+++ Source/WebKit/chromium/src/WebFrameImpl.cpp (working copy)
@@ -2259,6 +2259,8 @@
if (!m_frame->document() || !m_frame->page())
return;
+ RefPtr<Document> ownerDocument(m_frame->document());
+
// Protect privileged pages against bookmarklets and other javascript manipulations.
if (SchemeRegistry::shouldTreatURLSchemeAsNotAllowingJavascriptURLs(m_frame->document()->url().protocol()))
return;
@@ -2271,7 +2273,7 @@
return;
if (!m_frame->navigationScheduler()->locationChangePending())
- m_frame->document()->loader()->writer()->replaceDocument(scriptResult);
+ m_frame->document()->loader()->writer()->replaceDocument(scriptResult, ownerDocument.get());
}
} // namespace WebKit
« no previous file with comments | « Source/WebCore/loader/DocumentWriter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698