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

Unified Diff: third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp

Issue 2804403003: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/fileapi (Closed)
Patch Set: fix 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/core/fileapi/FileReaderLoader.cpp
diff --git a/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp b/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp
index 17c2b25448973d4a2f2ca952ec8522fd46a6129a..10480acbe475213735b95ba81fc479114c5f8872 100644
--- a/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp
+++ b/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp
@@ -174,7 +174,7 @@ void FileReaderLoader::DidReceiveResponse(
total_bytes_ = -1;
}
- ASSERT(!raw_data_);
+ DCHECK(!raw_data_);
if (read_type_ != kReadByClient) {
// Check that we can cast to unsigned since we have to do
@@ -207,7 +207,7 @@ void FileReaderLoader::DidReceiveResponse(
}
void FileReaderLoader::DidReceiveData(const char* data, unsigned data_length) {
- ASSERT(data);
+ DCHECK(data);
// Bail out if we already encountered an error.
if (error_code_)
@@ -284,7 +284,7 @@ FileError::ErrorCode FileReaderLoader::HttpStatusCodeToErrorCode(
}
DOMArrayBuffer* FileReaderLoader::ArrayBufferResult() {
- ASSERT(read_type_ == kReadAsArrayBuffer);
+ DCHECK_EQ(read_type_, kReadAsArrayBuffer);
// If the loading is not started or an error occurs, return an empty result.
if (!raw_data_ || error_code_)
@@ -301,7 +301,8 @@ DOMArrayBuffer* FileReaderLoader::ArrayBufferResult() {
}
String FileReaderLoader::StringResult() {
- ASSERT(read_type_ != kReadAsArrayBuffer && read_type_ != kReadByClient);
+ DCHECK_NE(read_type_, kReadAsArrayBuffer);
+ DCHECK_NE(read_type_, kReadByClient);
// If the loading is not started or an error occurs, return an empty result.
if (!raw_data_ || error_code_)
@@ -328,7 +329,7 @@ String FileReaderLoader::StringResult() {
ConvertToDataURL();
break;
default:
- ASSERT_NOT_REACHED();
+ NOTREACHED();
}
return string_result_;
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/FileReader.cpp ('k') | third_party/WebKit/Source/core/fileapi/FileReaderLoaderClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698