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

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

Issue 2706303002: Check whether ScriptResource is still loading due to revalidation (Closed)
Patch Set: Rebase 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 | third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp » ('j') | 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 7ea074252620e6ed402a035c3bbe8bfceba0d48e..cdcf29482b4339a0fba0515ad7b81af7437d1ae7 100644
--- a/third_party/WebKit/Source/core/dom/PendingScript.cpp
+++ b/third_party/WebKit/Source/core/dom/PendingScript.cpp
@@ -221,13 +221,19 @@ DEFINE_TRACE(PendingScript) {
MemoryCoordinatorClient::trace(visitor);
}
-ScriptSourceCode PendingScript::getSource(const KURL& documentURL,
- bool& errorOccurred) const {
+NOINLINE ScriptSourceCode PendingScript::getSource(const KURL& documentURL,
+ bool& errorOccurred) const {
checkState();
errorOccurred = this->errorOccurred();
if (resource()) {
- DCHECK(resource()->isLoaded());
+ // For investigating https://crbug.com/692856.
+ CHECK(resource()->isLoaded() ||
+ (resource()->isLoading() && resource()->hasRevalidated()));
+ CHECK(resource()->isLoaded() ||
+ (resource()->isLoading() && resource()->isCacheValidator()));
+ CHECK(resource()->isLoaded());
+
if (m_streamer && !m_streamer->streamingSuppressed())
return ScriptSourceCode(m_streamer, resource());
return ScriptSourceCode(resource());
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698