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 2b19ef87843d7094d9609e67a09d1dd809adbd41..d3926f00265e7d82017301a55fc050a935a556ea 100644 |
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp |
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp |
@@ -464,8 +464,7 @@ void ScriptLoader::notifyFinished(Resource* resource) |
{ |
DCHECK(!m_willBeParserExecuted); |
- Document* elementDocument = &(m_element->document()); |
- Document* contextDocument = elementDocument->contextDocument(); |
+ Document* contextDocument = m_element->document().contextDocument(); |
if (!contextDocument) |
return; |
@@ -474,8 +473,8 @@ void ScriptLoader::notifyFinished(Resource* resource) |
ScriptRunner::ExecutionType runOrder = m_willExecuteInOrder ? ScriptRunner::IN_ORDER_EXECUTION : ScriptRunner::ASYNC_EXECUTION; |
if (m_resource->errorOccurred()) { |
contextDocument->scriptRunner()->notifyScriptLoadError(this, runOrder); |
- dispatchErrorEvent(); |
detach(); |
+ dispatchErrorEvent(); |
return; |
} |
contextDocument->scriptRunner()->notifyScriptReady(this, runOrder); |