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

Unified Diff: third_party/WebKit/Source/core/fileapi/Blob.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 | « no previous file | third_party/WebKit/Source/core/fileapi/File.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fileapi/Blob.cpp
diff --git a/third_party/WebKit/Source/core/fileapi/Blob.cpp b/third_party/WebKit/Source/core/fileapi/Blob.cpp
index 1f7b7ad9b8b2adbabdf38b6ce904f37f40035c20..879d0acd0840bc91f7ca7635d602ad951615fcde 100644
--- a/third_party/WebKit/Source/core/fileapi/Blob.cpp
+++ b/third_party/WebKit/Source/core/fileapi/Blob.cpp
@@ -59,7 +59,7 @@ class BlobURLRegistry final : public URLRegistry {
void BlobURLRegistry::RegisterURL(SecurityOrigin* origin,
const KURL& public_url,
URLRegistrable* registrable_object) {
- ASSERT(&registrable_object->Registry() == this);
+ DCHECK_EQ(&registrable_object->Registry(), this);
Blob* blob = static_cast<Blob*>(registrable_object);
BlobRegistry::RegisterPublicBlobURL(origin, public_url,
blob->GetBlobDataHandle());
@@ -92,9 +92,9 @@ Blob* Blob::Create(
const HeapVector<ArrayBufferOrArrayBufferViewOrBlobOrUSVString>& blob_parts,
const BlobPropertyBag& options,
ExceptionState& exception_state) {
- ASSERT(options.hasType());
+ DCHECK(options.hasType());
- 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);
@@ -112,7 +112,7 @@ Blob* Blob::Create(
Blob* Blob::Create(const unsigned char* data,
size_t bytes,
const String& content_type) {
- ASSERT(data);
+ DCHECK(data);
std::unique_ptr<BlobData> blob_data = BlobData::Create();
blob_data->SetContentType(content_type);
@@ -148,7 +148,7 @@ void Blob::PopulateBlobData(
// static
void Blob::ClampSliceOffsets(long long size, long long& start, long long& end) {
- ASSERT(size != -1);
+ DCHECK_NE(size, -1);
// Convert the negative value that is used to select from the end.
if (start < 0)
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fileapi/File.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698