Index: Source/core/dom/ScriptRunner.cpp |
diff --git a/Source/core/dom/ScriptRunner.cpp b/Source/core/dom/ScriptRunner.cpp |
index a79adbca74937515055495d9e6da56f0deaee485..bf1d254109b5e31a144b5a34c76757f11e28ef42 100644 |
--- a/Source/core/dom/ScriptRunner.cpp |
+++ b/Source/core/dom/ScriptRunner.cpp |
@@ -132,17 +132,14 @@ |
// to detach). |
RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(m_pendingAsyncScripts.contains(scriptLoader)); |
m_pendingAsyncScripts.remove(scriptLoader); |
+ scriptLoader->detach(); |
+ m_document->decrementLoadEventDelayCount(); |
break; |
case IN_ORDER_EXECUTION: |
RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_scriptsToExecuteInOrder.isEmpty()); |
- // Remove; script failed to load and error event has been dispatched. |
- ScriptLoader* script = m_scriptsToExecuteInOrder.takeFirst(); |
- ASSERT_UNUSED(script, script == scriptLoader); |
- break; |
- } |
- scriptLoader->detach(); |
- m_document->decrementLoadEventDelayCount(); |
+ break; |
+ } |
} |
void ScriptRunner::movePendingAsyncScript(Document& oldDocument, Document& newDocument, ScriptLoader* scriptLoader) |