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

Unified Diff: Source/core/dom/ScriptRunner.cpp

Issue 1277273002: Revert of Upon load failure, remove sync script from execution queue. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | « LayoutTests/http/tests/misc/script-sync-slow-scripts-onerror-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ScriptRunner.cpp
diff --git a/Source/core/dom/ScriptRunner.cpp b/Source/core/dom/ScriptRunner.cpp
index 5342e3732b5137b156de61f9e7d525e8b8258e73..bf1d254109b5e31a144b5a34c76757f11e28ef42 100644
--- a/Source/core/dom/ScriptRunner.cpp
+++ b/Source/core/dom/ScriptRunner.cpp
@@ -132,23 +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:
- WillBeHeapDeque<RawPtrWillBeMember<ScriptLoader>>::iterator it = m_scriptsToExecuteInOrder.begin();
- while (it != m_scriptsToExecuteInOrder.end()) {
- if (*it == scriptLoader) {
- m_scriptsToExecuteInOrder.remove(it);
- break;
- }
- ++it;
- }
- // Verifies same condition as above, but for in-order script loads.
- RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(it != m_scriptsToExecuteInOrder.end());
- break;
- }
- scriptLoader->detach();
- m_document->decrementLoadEventDelayCount();
+ RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_scriptsToExecuteInOrder.isEmpty());
+ break;
+ }
}
void ScriptRunner::movePendingAsyncScript(Document& oldDocument, Document& newDocument, ScriptLoader* scriptLoader)
« no previous file with comments | « LayoutTests/http/tests/misc/script-sync-slow-scripts-onerror-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698