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

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: Rebase 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 be7a766f80883c304a47fcf419b5f26a13323b24..b0b98e2bbcd64854e94ec70fe92f813f575aebc9 100644
--- a/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp
@@ -63,15 +63,15 @@ PassRefPtr<ChannelMergerHandler> ChannelMergerHandler::create(AudioNode& node, f
void ChannelMergerHandler::process(size_t framesToProcess)
{
AudioNodeOutput& output = this->output(0);
- ASSERT_UNUSED(framesToProcess, framesToProcess == output.bus()->length());
+ DCHECK_EQ(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