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

Unified Diff: third_party/WebKit/Source/core/loader/resource/ScriptResource.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
Index: third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp
diff --git a/third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp b/third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp
index d3be9db3a13ad3c429296b48aa9dbc0162ae9c9d..9e77ec4a7eee1f5e8819c44e281060b1fcb7ce4b 100644
--- a/third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp
+++ b/third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp
@@ -83,8 +83,11 @@ void ScriptResource::onMemoryDump(WebMemoryDumpLevelOfDetail levelOfDetail,
dump->guid(), String(WTF::Partitions::kAllocatedObjectPoolName));
}
-const String& ScriptResource::script() {
- DCHECK(isLoaded());
+NOINLINE const String& ScriptResource::script() {
+ // For investigating https://crbug.com/692856.
+ CHECK(isLoaded() || (isLoading() && hasRevalidated()));
+ CHECK(isLoaded() || (isLoading() && isCacheValidator()));
+ CHECK(isLoaded());
if (m_script.isNull() && data()) {
String script = decodedText();
« no previous file with comments | « third_party/WebKit/Source/core/dom/PendingScript.cpp ('k') | third_party/WebKit/Source/platform/loader/fetch/Resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698