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

Unified Diff: third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBuffer.h

Issue 2833123002: Replace ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/wtf (Closed)
Patch Set: wtf 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/wtf/typed_arrays/ArrayBuffer.h
diff --git a/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBuffer.h b/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBuffer.h
index 3836c0e08430998da2d4bf0456b25e0315ab3032..3acd9c5b0b6770c03514023b18056136eac8bf3f 100644
--- a/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBuffer.h
+++ b/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBuffer.h
@@ -145,7 +145,7 @@ PassRefPtr<ArrayBuffer> ArrayBuffer::Create(const void* source,
}
PassRefPtr<ArrayBuffer> ArrayBuffer::Create(ArrayBufferContents& contents) {
- RELEASE_ASSERT(contents.DataMaybeShared());
+ CHECK(contents.DataMaybeShared());
return AdoptRef(new ArrayBuffer(contents));
}
@@ -168,7 +168,7 @@ PassRefPtr<ArrayBuffer> ArrayBuffer::Create(
ArrayBufferContents::InitializationPolicy policy) {
ArrayBufferContents contents(num_elements, element_byte_size,
ArrayBufferContents::kNotShared, policy);
- RELEASE_ASSERT(contents.Data());
+ CHECK(contents.Data());
return AdoptRef(new ArrayBuffer(contents));
}
@@ -193,7 +193,7 @@ PassRefPtr<ArrayBuffer> ArrayBuffer::CreateShared(const void* source,
unsigned byte_length) {
ArrayBufferContents contents(byte_length, 1, ArrayBufferContents::kShared,
ArrayBufferContents::kDontInitialize);
- RELEASE_ASSERT(contents.DataShared());
+ CHECK(contents.DataShared());
RefPtr<ArrayBuffer> buffer = AdoptRef(new ArrayBuffer(contents));
memcpy(buffer->DataShared(), source, byte_length);
return buffer.Release();
@@ -205,7 +205,7 @@ PassRefPtr<ArrayBuffer> ArrayBuffer::CreateShared(
ArrayBufferContents::InitializationPolicy policy) {
ArrayBufferContents contents(num_elements, element_byte_size,
ArrayBufferContents::kShared, policy);
- RELEASE_ASSERT(contents.DataShared());
+ CHECK(contents.DataShared());
return AdoptRef(new ArrayBuffer(contents));
}

Powered by Google App Engine
This is Rietveld 408576698