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

Unified Diff: third_party/WebKit/Source/core/fetch/RawResource.cpp

Issue 2314503003: Capture wrong states in RawResourceClientStateChecker::responseReceived() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Loader_assertNeverINline
Patch Set: Created 4 years, 3 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/fetch/RawResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/RawResource.cpp b/third_party/WebKit/Source/core/fetch/RawResource.cpp
index 129ffa734e10d3640e44e02261d1b02e2569c960..710c57b7b3dc2ac8a98b3ba94d720571cffcedf6 100644
--- a/third_party/WebKit/Source/core/fetch/RawResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/RawResource.cpp
@@ -299,9 +299,15 @@ NEVER_INLINE void RawResourceClientStateChecker::dataSent()
NEVER_INLINE void RawResourceClientStateChecker::responseReceived()
{
- // TODO(hiroshige): Temporarily we use DCHECK() here instead of CHECK(),
- // due to crbug.com/640960.
- SECURITY_DCHECK(m_state == Started);
+ // TODO(hiroshige): Temporarily we insert the checks below to capture the
+ // wrong state. The checks should be reverted shortly. crbug.com/640960.
+ SECURITY_CHECK(m_state != NotAddedAsClient);
+ SECURITY_CHECK(m_state != RedirectBlocked);
+ SECURITY_CHECK(m_state != ResponseReceived);
+ SECURITY_CHECK(m_state != SetSerializedCachedMetadata);
+ SECURITY_CHECK(m_state != DataReceived);
+ SECURITY_CHECK(m_state != DataDownloaded);
+ SECURITY_CHECK(m_state != NotifyFinished);
yhirano 2016/09/07 02:07:46 Can you add SECURITY_CHECK(m_state == Started)?
hiroshige 2016/09/07 02:10:45 Done.
m_state = ResponseReceived;
}
« 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