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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.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, 5 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/AudioNodeOutput.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp b/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp
index ed17124d56f74be71014855a21ed61fc9617c5db..d26ceb40e4d6083cc5a70692d4203f87f1a5a7a1 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp
@@ -43,7 +43,7 @@ inline AudioNodeOutput::AudioNodeOutput(AudioHandler* handler, unsigned numberOf
, m_renderingFanOutCount(0)
, m_renderingParamFanOutCount(0)
{
- ASSERT(numberOfChannels <= AbstractAudioContext::maxNumberOfChannels());
+ DCHECK(numberOfChannels <= AbstractAudioContext::maxNumberOfChannels());
m_internalBus = AudioBus::create(numberOfChannels, AudioHandler::ProcessingSizeInFrames);
}
@@ -60,13 +60,13 @@ void AudioNodeOutput::dispose()
#endif
deferredTaskHandler().removeMarkedAudioNodeOutput(this);
disconnectAll();
- ASSERT(m_inputs.isEmpty());
- ASSERT(m_params.isEmpty());
+ DCHECK(m_inputs.isEmpty());
+ DCHECK(m_params.isEmpty());
}
void AudioNodeOutput::setNumberOfChannels(unsigned numberOfChannels)
{
- ASSERT(numberOfChannels <= AbstractAudioContext::maxNumberOfChannels());
+ DCHECK(numberOfChannels <= AbstractAudioContext::maxNumberOfChannels());
ASSERT(deferredTaskHandler().isGraphOwner());
m_desiredNumberOfChannels = numberOfChannels;
@@ -75,7 +75,7 @@ void AudioNodeOutput::setNumberOfChannels(unsigned numberOfChannels)
// If we're in the audio thread then we can take care of it right away (we should be at the very start or end of a rendering quantum).
updateNumberOfChannels();
} else {
- ASSERT(!m_didCallDispose);
+ DCHECK(!m_didCallDispose);
// Let the context take care of it in the audio thread in the pre and post render tasks.
deferredTaskHandler().markAudioNodeOutputDirty(this);
}
@@ -98,7 +98,7 @@ void AudioNodeOutput::updateRenderingState()
void AudioNodeOutput::updateNumberOfChannels()
{
- ASSERT(deferredTaskHandler().isAudioThread());
+ DCHECK(deferredTaskHandler().isAudioThread());
ASSERT(deferredTaskHandler().isGraphOwner());
if (m_numberOfChannels != m_desiredNumberOfChannels) {
@@ -110,7 +110,7 @@ void AudioNodeOutput::updateNumberOfChannels()
void AudioNodeOutput::propagateChannelCount()
{
- ASSERT(deferredTaskHandler().isAudioThread());
+ DCHECK(deferredTaskHandler().isAudioThread());
ASSERT(deferredTaskHandler().isGraphOwner());
if (isChannelCountKnown()) {
@@ -122,8 +122,8 @@ void AudioNodeOutput::propagateChannelCount()
AudioBus* AudioNodeOutput::pull(AudioBus* inPlaceBus, size_t framesToProcess)
{
- ASSERT(deferredTaskHandler().isAudioThread());
- ASSERT(m_renderingFanOutCount > 0 || m_renderingParamFanOutCount > 0);
+ DCHECK(deferredTaskHandler().isAudioThread());
+ DCHECK(m_renderingFanOutCount > 0 || m_renderingParamFanOutCount > 0);
// Causes our AudioNode to process if it hasn't already for this render quantum.
// We try to do in-place processing (using inPlaceBus) if at all possible,
@@ -141,7 +141,7 @@ AudioBus* AudioNodeOutput::pull(AudioBus* inPlaceBus, size_t framesToProcess)
AudioBus* AudioNodeOutput::bus() const
{
- ASSERT(deferredTaskHandler().isAudioThread());
+ DCHECK(deferredTaskHandler().isAudioThread());
return m_isInPlace ? m_inPlaceBus.get() : m_internalBus.get();
}
@@ -188,14 +188,14 @@ void AudioNodeOutput::disconnectAllInputs()
void AudioNodeOutput::disconnectInput(AudioNodeInput& input)
{
ASSERT(deferredTaskHandler().isGraphOwner());
- ASSERT(isConnectedToInput(input));
+ DCHECK(isConnectedToInput(input));
input.disconnect(*this);
}
void AudioNodeOutput::disconnectAudioParam(AudioParamHandler& param)
{
ASSERT(deferredTaskHandler().isGraphOwner());
- ASSERT(isConnectedToAudioParam(param));
+ DCHECK(isConnectedToAudioParam(param));
param.disconnect(*this);
}

Powered by Google App Engine
This is Rietveld 408576698