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

Unified Diff: third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp

Issue 2804023004: Replace ASSERT with DCHECK in modules/fetch. (Closed)
Patch Set: Use DCHECK_EQ in all but a few instances Created 3 years, 8 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/modules/fetch/FetchResponseData.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp b/third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp
index 732b8d2202ddeb73d6a5921d71d529b8bb921064..b38e2e28474614d543aa20fc656915702515536b 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp
@@ -220,16 +220,16 @@ FetchResponseData* FetchResponseData::Clone(ScriptState* script_state) {
switch (type_) {
case kBasicType:
case kCORSType:
- ASSERT(internal_response_);
- ASSERT(buffer_ == internal_response_->buffer_);
- ASSERT(internal_response_->type_ == kDefaultType);
+ DCHECK(internal_response_);
+ DCHECK_EQ(buffer_, internal_response_->buffer_);
+ DCHECK_EQ(internal_response_->type_, kDefaultType);
new_response->internal_response_ =
internal_response_->Clone(script_state);
buffer_ = internal_response_->buffer_;
new_response->buffer_ = new_response->internal_response_->buffer_;
break;
case kDefaultType: {
- ASSERT(!internal_response_);
+ DCHECK(!internal_response_);
if (buffer_) {
BodyStreamBuffer* new1 = nullptr;
BodyStreamBuffer* new2 = nullptr;
@@ -240,14 +240,14 @@ FetchResponseData* FetchResponseData::Clone(ScriptState* script_state) {
break;
}
case kErrorType:
- ASSERT(!internal_response_);
- ASSERT(!buffer_);
+ DCHECK(!internal_response_);
+ DCHECK(!buffer_);
break;
case kOpaqueType:
case kOpaqueRedirectType:
- ASSERT(internal_response_);
- ASSERT(!buffer_);
- ASSERT(internal_response_->type_ == kDefaultType);
+ DCHECK(internal_response_);
+ DCHECK(!buffer_);
+ DCHECK_EQ(internal_response_->type_, kDefaultType);
new_response->internal_response_ =
internal_response_->Clone(script_state);
break;
@@ -289,11 +289,11 @@ FetchResponseData::FetchResponseData(Type type,
void FetchResponseData::ReplaceBodyStreamBuffer(BodyStreamBuffer* buffer) {
if (type_ == kBasicType || type_ == kCORSType) {
- ASSERT(internal_response_);
+ DCHECK(internal_response_);
internal_response_->buffer_ = buffer;
buffer_ = buffer;
} else if (type_ == kDefaultType) {
- ASSERT(!internal_response_);
+ DCHECK(!internal_response_);
buffer_ = buffer;
}
}
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/FetchManager.cpp ('k') | third_party/WebKit/Source/modules/fetch/Headers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698