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

Unified Diff: third_party/WebKit/Source/core/fileapi/File.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
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/File.h ('k') | third_party/WebKit/Source/core/fileapi/FileError.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fileapi/File.cpp
diff --git a/third_party/WebKit/Source/core/fileapi/File.cpp b/third_party/WebKit/Source/core/fileapi/File.cpp
index 07c511a77148be52ed1825cc413099b4e44484d4..794cf35e129dd63081d239dfac5cb84b05783802 100644
--- a/third_party/WebKit/Source/core/fileapi/File.cpp
+++ b/third_party/WebKit/Source/core/fileapi/File.cpp
@@ -50,7 +50,7 @@ static String GetContentTypeFromFileName(const String& name,
type = MIMETypeRegistry::GetWellKnownMIMETypeForExtension(
name.Substring(index + 1));
} else {
- ASSERT(policy == File::kAllContentTypes);
+ DCHECK_EQ(policy, File::kAllContentTypes);
type =
MIMETypeRegistry::GetMIMETypeForExtension(name.Substring(index + 1));
}
@@ -123,14 +123,14 @@ File* File::Create(
const String& file_name,
const FilePropertyBag& options,
ExceptionState& exception_state) {
- ASSERT(options.hasType());
+ DCHECK(options.hasType());
double last_modified;
if (options.hasLastModified())
last_modified = static_cast<double>(options.lastModified());
else
last_modified = CurrentTimeMS();
- ASSERT(options.hasEndings());
+ DCHECK(options.hasEndings());
bool normalize_line_endings_to_native = options.endings() == "native";
if (normalize_line_endings_to_native)
UseCounter::Count(context, UseCounter::kFileAPINativeLineEndings);
@@ -329,7 +329,7 @@ Blob* File::slice(long long start,
blob_data->AppendFileSystemURL(file_system_url_, start, length,
modification_time_ms / kMsPerSecond);
} else {
- ASSERT(!path_.IsEmpty());
+ DCHECK(!path_.IsEmpty());
blob_data->AppendFile(path_, start, length,
modification_time_ms / kMsPerSecond);
}
@@ -393,7 +393,7 @@ void File::AppendTo(BlobData& blob_data) const {
modification_time_ms / kMsPerSecond);
return;
}
- ASSERT(!path_.IsEmpty());
+ DCHECK(!path_.IsEmpty());
blob_data.AppendFile(path_, 0, size, modification_time_ms / kMsPerSecond);
}
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/File.h ('k') | third_party/WebKit/Source/core/fileapi/FileError.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698