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

Unified Diff: Source/WebCore/bindings/ScriptControllerBase.cpp

Issue 7147018: Merge 87756 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 years, 6 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/WebCore.exp.in ('k') | Source/WebCore/dom/Document.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/bindings/ScriptControllerBase.cpp
===================================================================
--- Source/WebCore/bindings/ScriptControllerBase.cpp (revision 88811)
+++ Source/WebCore/bindings/ScriptControllerBase.cpp (working copy)
@@ -107,9 +107,12 @@
// FIXME: We should always replace the document, but doing so
// synchronously can cause crashes:
// http://bugs.webkit.org/show_bug.cgi?id=16782
- if (shouldReplaceDocumentIfJavaScriptURL == ReplaceDocumentIfJavaScriptURL)
- m_frame->document()->loader()->writer()->replaceDocument(scriptResult);
-
+ if (shouldReplaceDocumentIfJavaScriptURL == ReplaceDocumentIfJavaScriptURL) {
+ // We're still in a frame, so there should be a DocumentLoader.
+ ASSERT(m_frame->document()->loader());
+ if (DocumentLoader* loader = m_frame->document()->loader())
+ loader->writer()->replaceDocument(scriptResult);
+ }
return true;
}
« no previous file with comments | « Source/WebCore/WebCore.exp.in ('k') | Source/WebCore/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698