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

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

Issue 2715533007: Use ScriptLoader::errorOccurred() instead of Resource in ScriptLoader (Closed)
Patch Set: Move DCHECK_EQ Created 3 years, 10 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
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 e32b4516f1b353bdf0e889e6dcee3554dd61e551..556fd9b9bc08b85524bea725d0620f317f46dbbf 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -832,6 +832,7 @@ void ScriptLoader::execute() {
void ScriptLoader::pendingScriptFinished(PendingScript* pendingScript) {
DCHECK(!m_willBeParserExecuted);
DCHECK_EQ(m_pendingScript, pendingScript);
+ DCHECK_EQ(pendingScript->resource(), m_resource);
// We do not need this script in the memory cache. The primary goals of
// sending this fetch request are to let the third party server know
@@ -852,9 +853,7 @@ void ScriptLoader::pendingScriptFinished(PendingScript* pendingScript) {
return;
}
- DCHECK_EQ(pendingScript->resource(), m_resource);
-
- if (m_resource->errorOccurred()) {
+ if (errorOccurred()) {
contextDocument->scriptRunner()->notifyScriptLoadError(this,
m_asyncExecType);
detachPendingScript();
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors-bad-integrity.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698