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

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

Issue 2716543002: Fix PendingScript::errorOccurred() to be consistent with getSource() (Closed)
Patch Set: 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
« 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/PendingScript.cpp
diff --git a/third_party/WebKit/Source/core/dom/PendingScript.cpp b/third_party/WebKit/Source/core/dom/PendingScript.cpp
index f747fb07d4576b63a7d5368d7602bd174becc306..7ea074252620e6ed402a035c3bbe8bfceba0d48e 100644
--- a/third_party/WebKit/Source/core/dom/PendingScript.cpp
+++ b/third_party/WebKit/Source/core/dom/PendingScript.cpp
@@ -225,15 +225,14 @@ ScriptSourceCode PendingScript::getSource(const KURL& documentURL,
bool& errorOccurred) const {
checkState();
+ errorOccurred = this->errorOccurred();
if (resource()) {
- errorOccurred = resource()->errorOccurred() || m_integrityFailure;
DCHECK(resource()->isLoaded());
if (m_streamer && !m_streamer->streamingSuppressed())
return ScriptSourceCode(m_streamer, resource());
return ScriptSourceCode(resource());
}
- errorOccurred = false;
return ScriptSourceCode(m_element->textContent(), documentURL,
startingPosition());
}
@@ -257,7 +256,7 @@ bool PendingScript::isReady() const {
bool PendingScript::errorOccurred() const {
checkState();
if (resource())
- return resource()->errorOccurred();
+ return resource()->errorOccurred() || m_integrityFailure;
sof 2017/02/23 08:10:48 The ScriptLoader will consult the resource to deci
hiroshige 2017/02/23 16:41:25 Oh, this line? I'll update it soon. https://codese
return false;
}
« 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