| Index: third_party/WebKit/Source/core/dom/ScriptLoader.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
|
| index 910288e42f2bec6332d65f4357934511c9adc49d..3c86d583090ca87516a32e8965eba6611c283906 100644
|
| --- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
|
| @@ -463,14 +463,9 @@ void ScriptLoader::notifyFinished(Resource* resource)
|
|
|
| ScriptRunner::ExecutionType runOrder = m_willExecuteInOrder ? ScriptRunner::IN_ORDER_EXECUTION : ScriptRunner::ASYNC_EXECUTION;
|
| if (m_resource->errorOccurred()) {
|
| - dispatchErrorEvent();
|
| - // The error handler can move the HTMLScriptElement to a new document.
|
| - // In that case, we must notify the ScriptRunner of the new document,
|
| - // not the ScriptRunner of the old docuemnt.
|
| - contextDocument = m_element->document().contextDocument().get();
|
| - if (!contextDocument)
|
| - return;
|
| contextDocument->scriptRunner()->notifyScriptLoadError(this, runOrder);
|
| + dispatchErrorEvent();
|
| + detach();
|
| return;
|
| }
|
| contextDocument->scriptRunner()->notifyScriptReady(this, runOrder);
|
|
|