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

Unified Diff: third_party/WebKit/Source/platform/audio/AudioArray.h

Issue 2803073002: Convert RELEASE_ASSERT()/ASSERT(...) to CHECK()/DCHECK_op(...) in platform/audio (Closed)
Patch Set: 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/platform/audio/AudioBus.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/audio/AudioArray.h
diff --git a/third_party/WebKit/Source/platform/audio/AudioArray.h b/third_party/WebKit/Source/platform/audio/AudioArray.h
index 8965c14e4def6d54b69ec7374ac0b678d2ea977f..a05bf4fbf5d6ad11840e9e5863ea940973a8d74f 100644
--- a/third_party/WebKit/Source/platform/audio/AudioArray.h
+++ b/third_party/WebKit/Source/platform/audio/AudioArray.h
@@ -58,7 +58,7 @@ class AudioArray {
// Although n is a size_t, its true limit is max unsigned because we use
// unsigned in zeroRange() and copyToRange(). Also check for integer
// overflow.
- RELEASE_ASSERT(n <= std::numeric_limits<unsigned>::max() / sizeof(T));
+ CHECK_LE(n, std::numeric_limits<unsigned>::max() / sizeof(T));
unsigned initialSize = sizeof(T) * n;
@@ -79,12 +79,12 @@ class AudioArray {
static size_t extraAllocationBytes = 0;
// Again, check for integer overflow.
- RELEASE_ASSERT(initialSize + extraAllocationBytes >= initialSize);
+ CHECK_GE(initialSize + extraAllocationBytes, initialSize);
T* allocation = static_cast<T*>(WTF::Partitions::fastMalloc(
initialSize + extraAllocationBytes,
WTF_HEAP_PROFILER_TYPE_NAME(AudioArray<T>)));
- RELEASE_ASSERT(allocation);
+ CHECK(allocation);
Raymond Toy 2017/04/06 17:48:16 Comment: This should have been done in the previou
hongchan 2017/04/06 17:52:27 I didn't want to run a script only to take care of
T* alignedData = alignedAddress(allocation, alignment);
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/audio/AudioBus.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698