| Index: Source/bindings/core/v8/ScriptController.cpp
|
| diff --git a/Source/bindings/core/v8/ScriptController.cpp b/Source/bindings/core/v8/ScriptController.cpp
|
| index 26f81df5fff5417f873c861135f85347b878354e..52e8dbc6111c155f1e4ec74338336a22dcd6fe6e 100644
|
| --- a/Source/bindings/core/v8/ScriptController.cpp
|
| +++ b/Source/bindings/core/v8/ScriptController.cpp
|
| @@ -558,12 +558,7 @@ bool ScriptController::executeScriptIfJavaScriptURL(const KURL& url)
|
| if (!locationChangeBefore && m_frame->navigationScheduler().locationChangePending())
|
| return true;
|
|
|
| - // DocumentWriter::replaceDocument can cause the DocumentLoader to get deref'ed and possible destroyed,
|
| - // so protect it with a RefPtr.
|
| - if (RefPtr<DocumentLoader> loader = m_frame->document()->loader()) {
|
| - UseCounter::count(*m_frame->document(), UseCounter::ReplaceDocumentViaJavaScriptURL);
|
| - loader->replaceDocument(scriptResult, ownerDocument.get());
|
| - }
|
| + m_frame->loader().replaceDocument(scriptResult, ownerDocument.get());
|
| return true;
|
| }
|
|
|
|
|