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

Unified Diff: third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp

Issue 2159403002: Replace ASSERT with DCHECK in WebAudio (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/modules/webaudio/ChannelMergerNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp b/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp
index c19aad88290b1589553c8f3d3c496300fdd52c26..881d118f2436c0cc352511c77fecb1bcfd0f9499 100644
--- a/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp
@@ -66,12 +66,12 @@ void ChannelMergerHandler::process(size_t framesToProcess)
ASSERT_UNUSED(framesToProcess, framesToProcess == output.bus()->length());
unsigned numberOfOutputChannels = output.numberOfChannels();
- ASSERT(numberOfInputs() == numberOfOutputChannels);
+ DCHECK_EQ(numberOfInputs(), numberOfOutputChannels);
// Merge multiple inputs into one output.
for (unsigned i = 0; i < numberOfOutputChannels; ++i) {
AudioNodeInput& input = this->input(i);
- ASSERT(input.numberOfChannels() == 1);
+ DCHECK_EQ(input.numberOfChannels(), 1u);
AudioChannel* outputChannel = output.bus()->channel(i);
if (input.isConnected()) {
@@ -93,7 +93,7 @@ void ChannelMergerHandler::process(size_t framesToProcess)
void ChannelMergerHandler::setChannelCount(unsigned long channelCount, ExceptionState& exceptionState)
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
BaseAudioContext::AutoLocker locker(context());
// channelCount must be 1.
@@ -106,7 +106,7 @@ void ChannelMergerHandler::setChannelCount(unsigned long channelCount, Exception
void ChannelMergerHandler::setChannelCountMode(const String& mode, ExceptionState& exceptionState)
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
BaseAudioContext::AutoLocker locker(context());
// channcelCountMode must be 'explicit'.

Powered by Google App Engine
This is Rietveld 408576698