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(); |