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

Unified Diff: third_party/WebKit/Source/platform/exported/WebHTTPBody.cpp

Issue 2811463002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/exported (Closed)
Patch Set: rebase 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/platform/exported/WebHTTPBody.cpp
diff --git a/third_party/WebKit/Source/platform/exported/WebHTTPBody.cpp b/third_party/WebKit/Source/platform/exported/WebHTTPBody.cpp
index 0f8de896cf265fad0963d8eeb8c66cf79ceb5086..d21b692a35f6a12ce5c4eb4df6c2cfd1165df29d 100644
--- a/third_party/WebKit/Source/platform/exported/WebHTTPBody.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebHTTPBody.cpp
@@ -53,12 +53,12 @@ void WebHTTPBody::Assign(const WebHTTPBody& other) {
}
size_t WebHTTPBody::ElementCount() const {
- ASSERT(!IsNull());
+ DCHECK(!IsNull());
return private_->Elements().size();
}
bool WebHTTPBody::ElementAt(size_t index, Element& result) const {
- ASSERT(!IsNull());
+ DCHECK(!IsNull());
if (index >= private_->Elements().size())
return false;
@@ -96,7 +96,7 @@ bool WebHTTPBody::ElementAt(size_t index, Element& result) const {
result.modification_time = element.expected_file_modification_time_;
break;
default:
- ASSERT_NOT_REACHED();
+ NOTREACHED();
return false;
}
@@ -129,7 +129,7 @@ void WebHTTPBody::AppendFileSystemURLRange(const WebURL& url,
long long length,
double modification_time) {
// Currently we only support filesystem URL.
- ASSERT(KURL(url).ProtocolIs("filesystem"));
+ DCHECK(KURL(url).ProtocolIs("filesystem"));
EnsureMutable();
private_->AppendFileSystemURLRange(url, start, length, modification_time);
}
@@ -140,7 +140,7 @@ void WebHTTPBody::AppendBlob(const WebString& uuid) {
}
long long WebHTTPBody::Identifier() const {
- ASSERT(!IsNull());
+ DCHECK(!IsNull());
return private_->Identifier();
}
@@ -161,7 +161,7 @@ WebHTTPBody::WebHTTPBody(PassRefPtr<EncodedFormData> data)
: private_(static_cast<WebHTTPBodyPrivate*>(data.LeakRef())) {}
WebHTTPBody& WebHTTPBody::operator=(PassRefPtr<EncodedFormData> data) {
- Assign(static_cast<WebHTTPBodyPrivate*>(data.LeakRef()));
+ DCHECK(static_cast<WebHTTPBodyPrivate*>(data.LeakRef()));
dcheng1 2017/07/11 03:15:06 Just a friendly reminder to be careful with refact
return *this;
}
@@ -177,7 +177,7 @@ void WebHTTPBody::Assign(WebHTTPBodyPrivate* p) {
}
void WebHTTPBody::EnsureMutable() {
- ASSERT(!IsNull());
+ DCHECK(!IsNull());
if (!private_->HasOneRef())
Assign(static_cast<WebHTTPBodyPrivate*>(private_->Copy().LeakRef()));
}

Powered by Google App Engine
This is Rietveld 408576698