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

Unified Diff: third_party/WebKit/Source/platform/audio/AudioBus.cpp

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
Index: third_party/WebKit/Source/platform/audio/AudioBus.cpp
diff --git a/third_party/WebKit/Source/platform/audio/AudioBus.cpp b/third_party/WebKit/Source/platform/audio/AudioBus.cpp
index 2fbbb68638fb5097e14aa6d27d84ee559453eda9..5d59fc412a48c501355eecfdd1ae605941847137 100644
--- a/third_party/WebKit/Source/platform/audio/AudioBus.cpp
+++ b/third_party/WebKit/Source/platform/audio/AudioBus.cpp
@@ -49,7 +49,7 @@ const unsigned MaxBusChannels = 32;
PassRefPtr<AudioBus> AudioBus::create(unsigned numberOfChannels,
size_t length,
bool allocate) {
- ASSERT(numberOfChannels <= MaxBusChannels);
+ DCHECK_LE(numberOfChannels, MaxBusChannels);
if (numberOfChannels > MaxBusChannels)
return nullptr;
@@ -81,7 +81,7 @@ void AudioBus::setChannelMemory(unsigned channelIndex,
}
void AudioBus::resizeSmaller(size_t newLength) {
- ASSERT(newLength <= m_length);
+ DCHECK_LE(newLength, m_length);
if (newLength <= m_length)
m_length = newLength;
@@ -479,7 +479,7 @@ void AudioBus::copyWithGainFrom(const AudioBus& sourceBus,
}
unsigned numberOfChannels = this->numberOfChannels();
- ASSERT(numberOfChannels <= MaxBusChannels);
+ DCHECK_LE(numberOfChannels, MaxBusChannels);
if (numberOfChannels > MaxBusChannels)
return;
@@ -615,7 +615,8 @@ PassRefPtr<AudioBus> AudioBus::createBySampleRateConverting(
bool mixToMono,
double newSampleRate) {
// sourceBus's sample-rate must be known.
- ASSERT(sourceBus && sourceBus->sampleRate());
+ DCHECK(sourceBus);
+ DCHECK(sourceBus->sampleRate());
if (!sourceBus || !sourceBus->sampleRate())
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698