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

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

Issue 1413363012: ScriptRunner::notifyScriptLoadError(): fix broken sanity check. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | 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 fb555bb84a994ab8f448a185439f469790da6d49..1629e39120af7e36432d41915bb47701a3453b4d 100644
--- a/third_party/WebKit/Source/core/dom/ScriptRunner.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptRunner.cpp
@@ -206,14 +206,15 @@ void ScriptRunner::notifyScriptLoadError(ScriptLoader* scriptLoader, ExecutionTy
RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(m_numberOfInOrderScriptsWithPendingNotification > 0);
m_numberOfInOrderScriptsWithPendingNotification--;
- auto it = m_pendingInOrderScripts.begin();
- for (; it != m_pendingInOrderScripts.end(); ++it) {
+ bool foundPendingScript = false;
+ for (auto it = m_pendingInOrderScripts.begin(); it != m_pendingInOrderScripts.end(); ++it) {
if (*it == scriptLoader) {
m_pendingInOrderScripts.remove(it);
+ foundPendingScript = true;
break;
}
}
- RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(it != m_pendingInOrderScripts.end());
+ RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(foundPendingScript);
break;
}
scriptLoader->detach();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698