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

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: Add SECURITY_CHECK(m_state == Started) 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..b82baf3041e856eea59aeac238663bd99f6e045b 100644
--- a/third_party/WebKit/Source/core/fetch/RawResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/RawResource.cpp
@@ -299,9 +299,16 @@ 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);
+ SECURITY_CHECK(m_state == Started);
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