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

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

Issue 1424703007: Upon load failure, remove sync script from pending queue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add release assert Created 5 years, 1 month 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 | « third_party/WebKit/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: third_party/WebKit/Source/core/dom/ScriptRunner.cpp
diff --git a/third_party/WebKit/Source/core/dom/ScriptRunner.cpp b/third_party/WebKit/Source/core/dom/ScriptRunner.cpp
index c93aaa2ba861b5466a3541e5eb38af50b6ec8f9d..fb555bb84a994ab8f448a185439f469790da6d49 100644
--- a/third_party/WebKit/Source/core/dom/ScriptRunner.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptRunner.cpp
@@ -200,16 +200,24 @@ void ScriptRunner::notifyScriptLoadError(ScriptLoader* scriptLoader, ExecutionTy
// 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_numberOfInOrderScriptsWithPendingNotification > 0);
m_numberOfInOrderScriptsWithPendingNotification--;
+ auto it = m_pendingInOrderScripts.begin();
+ for (; it != m_pendingInOrderScripts.end(); ++it) {
+ if (*it == scriptLoader) {
+ m_pendingInOrderScripts.remove(it);
+ break;
+ }
+ }
+ RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(it != m_pendingInOrderScripts.end());
break;
}
+ scriptLoader->detach();
+ m_document->decrementLoadEventDelayCount();
}
void ScriptRunner::movePendingAsyncScript(Document& oldDocument, Document& newDocument, ScriptLoader* scriptLoader)
« no previous file with comments | « third_party/WebKit/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