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

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: 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/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..3e2cfceae317bd66c82f072eff7e5a923956d45e 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(&registrable_object->Registry(), this);
alancutter (OOO until 2018) 2017/04/10 00:23:41 DCHECK_EQ?
Hwanseung Lee 2017/04/10 15:01:31 Done.
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(size, -1);
alancutter (OOO until 2018) 2017/04/10 00:23:41 DCHECK_NE?
Hwanseung Lee 2017/04/10 15:01:31 Done.
// 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') | third_party/WebKit/Source/core/fileapi/File.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698