| Index: third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
|
| index bc6ccd61fe8dff82812cb360b1ded537322e0111..3edb0c5a93f6dc94595abc299e8401b1d67e6a36 100644
|
| --- a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
|
| +++ b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
|
| @@ -66,9 +66,9 @@ AudioHandler::AudioHandler(NodeType nodeType, AudioNode& node, float sampleRate)
|
|
|
| AudioHandler::~AudioHandler()
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| // dispose() should be called.
|
| - ASSERT(!node());
|
| + DCHECK(!node());
|
| InstanceCounters::decrementCounter(InstanceCounters::AudioHandlerCounter);
|
| #if DEBUG_AUDIONODE_REFERENCES
|
| --s_nodeCount[getNodeType()];
|
| @@ -93,7 +93,7 @@ void AudioHandler::clearInternalStateWhenDisabled()
|
|
|
| void AudioHandler::dispose()
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| ASSERT(context()->isGraphOwner());
|
|
|
| context()->deferredTaskHandler().removeChangedChannelCountMode(this);
|
| @@ -106,7 +106,7 @@ void AudioHandler::dispose()
|
|
|
| AudioNode* AudioHandler::node() const
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| return m_node;
|
| }
|
|
|
| @@ -166,9 +166,9 @@ void AudioHandler::setNodeType(NodeType type)
|
| {
|
| // Don't allow the node type to be changed to a different node type, after it's already been
|
| // set! And the new type can't be unknown or end!
|
| - ASSERT(m_nodeType == NodeTypeUnknown);
|
| - ASSERT(type != NodeTypeUnknown);
|
| - ASSERT(type != NodeTypeEnd);
|
| + DCHECK(m_nodeType == NodeTypeUnknown);
|
| + DCHECK(type != NodeTypeUnknown);
|
| + DCHECK(type != NodeTypeEnd);
|
|
|
| m_nodeType = type;
|
|
|
| @@ -185,7 +185,7 @@ void AudioHandler::addInput()
|
|
|
| void AudioHandler::addOutput(unsigned numberOfChannels)
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| m_outputs.append(AudioNodeOutput::create(this, numberOfChannels));
|
| node()->didAddOutput(numberOfOutputs());
|
| }
|
| @@ -207,7 +207,7 @@ unsigned long AudioHandler::channelCount()
|
|
|
| void AudioHandler::setChannelCount(unsigned long channelCount, ExceptionState& exceptionState)
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| AbstractAudioContext::AutoLocker locker(context());
|
|
|
| if (channelCount > 0 && channelCount <= AbstractAudioContext::maxNumberOfChannels()) {
|
| @@ -245,7 +245,7 @@ String AudioHandler::channelCountMode()
|
|
|
| void AudioHandler::setChannelCountMode(const String& mode, ExceptionState& exceptionState)
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| AbstractAudioContext::AutoLocker locker(context());
|
|
|
| ChannelCountMode oldMode = m_channelCountMode;
|
| @@ -278,7 +278,7 @@ String AudioHandler::channelInterpretation()
|
|
|
| void AudioHandler::setChannelInterpretation(const String& interpretation, ExceptionState& exceptionState)
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| AbstractAudioContext::AutoLocker locker(context());
|
|
|
| AudioBus::ChannelInterpretation oldMode = m_channelInterpretation;
|
| @@ -303,7 +303,7 @@ void AudioHandler::updateChannelsForInputs()
|
|
|
| void AudioHandler::processIfNecessary(size_t framesToProcess)
|
| {
|
| - ASSERT(context()->isAudioThread());
|
| + DCHECK(context()->isAudioThread());
|
|
|
| if (!isInitialized())
|
| return;
|
| @@ -336,10 +336,10 @@ void AudioHandler::processIfNecessary(size_t framesToProcess)
|
|
|
| void AudioHandler::checkNumberOfChannelsForInput(AudioNodeInput* input)
|
| {
|
| - ASSERT(context()->isAudioThread());
|
| + DCHECK(context()->isAudioThread());
|
| ASSERT(context()->isGraphOwner());
|
|
|
| - ASSERT(m_inputs.contains(input));
|
| + DCHECK(m_inputs.contains(input));
|
| if (!m_inputs.contains(input))
|
| return;
|
|
|
| @@ -363,7 +363,7 @@ bool AudioHandler::propagatesSilence() const
|
|
|
| void AudioHandler::pullInputs(size_t framesToProcess)
|
| {
|
| - ASSERT(context()->isAudioThread());
|
| + DCHECK(context()->isAudioThread());
|
|
|
| // Process all of the AudioNodes connected to our inputs.
|
| for (auto& input : m_inputs)
|
| @@ -394,7 +394,7 @@ void AudioHandler::unsilenceOutputs()
|
| void AudioHandler::enableOutputsIfNecessary()
|
| {
|
| if (m_isDisabled && m_connectionRefCount > 0) {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| AbstractAudioContext::AutoLocker locker(context());
|
|
|
| m_isDisabled = false;
|
| @@ -468,7 +468,7 @@ void AudioHandler::breakConnection()
|
| } else {
|
| // We were unable to get the lock, so put this in a list to finish up
|
| // later.
|
| - ASSERT(context()->isAudioThread());
|
| + DCHECK(context()->isAudioThread());
|
| context()->deferredTaskHandler().addDeferredBreakConnection(*this);
|
| }
|
| }
|
| @@ -536,7 +536,7 @@ AudioNode::AudioNode(AbstractAudioContext& context)
|
|
|
| void AudioNode::dispose()
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| AbstractAudioContext::AutoLocker locker(context());
|
| handler().dispose();
|
| if (context()->contextState() == AbstractAudioContext::Running)
|
| @@ -545,7 +545,7 @@ void AudioNode::dispose()
|
|
|
| void AudioNode::setHandler(PassRefPtr<AudioHandler> handler)
|
| {
|
| - ASSERT(handler);
|
| + DCHECK(handler);
|
| m_handler = handler;
|
| }
|
|
|
| @@ -569,7 +569,7 @@ AbstractAudioContext* AudioNode::context() const
|
|
|
| AudioNode* AudioNode::connect(AudioNode* destination, unsigned outputIndex, unsigned inputIndex, ExceptionState& exceptionState)
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| AbstractAudioContext::AutoLocker locker(context());
|
|
|
| if (context()->isContextClosed()) {
|
| @@ -631,7 +631,7 @@ AudioNode* AudioNode::connect(AudioNode* destination, unsigned outputIndex, unsi
|
|
|
| void AudioNode::connect(AudioParam* param, unsigned outputIndex, ExceptionState& exceptionState)
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| AbstractAudioContext::AutoLocker locker(context());
|
|
|
| if (context()->isContextClosed()) {
|
| @@ -698,7 +698,7 @@ bool AudioNode::disconnectFromOutputIfConnected(unsigned outputIndex, AudioParam
|
|
|
| void AudioNode::disconnect()
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| AbstractAudioContext::AutoLocker locker(context());
|
|
|
| // Disconnect all outgoing connections.
|
| @@ -708,7 +708,7 @@ void AudioNode::disconnect()
|
|
|
| void AudioNode::disconnect(unsigned outputIndex, ExceptionState& exceptionState)
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| AbstractAudioContext::AutoLocker locker(context());
|
|
|
| // Sanity check on the output index.
|
| @@ -730,7 +730,7 @@ void AudioNode::disconnect(unsigned outputIndex, ExceptionState& exceptionState)
|
|
|
| void AudioNode::disconnect(AudioNode* destination, ExceptionState& exceptionState)
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| AbstractAudioContext::AutoLocker locker(context());
|
|
|
| unsigned numberOfDisconnections = 0;
|
| @@ -755,7 +755,7 @@ void AudioNode::disconnect(AudioNode* destination, ExceptionState& exceptionStat
|
|
|
| void AudioNode::disconnect(AudioNode* destination, unsigned outputIndex, ExceptionState& exceptionState)
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| AbstractAudioContext::AutoLocker locker(context());
|
|
|
| if (outputIndex >= numberOfOutputs()) {
|
| @@ -790,7 +790,7 @@ void AudioNode::disconnect(AudioNode* destination, unsigned outputIndex, Excepti
|
|
|
| void AudioNode::disconnect(AudioNode* destination, unsigned outputIndex, unsigned inputIndex, ExceptionState& exceptionState)
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| AbstractAudioContext::AutoLocker locker(context());
|
|
|
| if (outputIndex >= numberOfOutputs()) {
|
| @@ -830,7 +830,7 @@ void AudioNode::disconnect(AudioNode* destination, unsigned outputIndex, unsigne
|
|
|
| void AudioNode::disconnect(AudioParam* destinationParam, ExceptionState& exceptionState)
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| AbstractAudioContext::AutoLocker locker(context());
|
|
|
| // The number of disconnection made.
|
| @@ -854,7 +854,7 @@ void AudioNode::disconnect(AudioParam* destinationParam, ExceptionState& excepti
|
|
|
| void AudioNode::disconnect(AudioParam* destinationParam, unsigned outputIndex, ExceptionState& exceptionState)
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| AbstractAudioContext::AutoLocker locker(context());
|
|
|
| if (outputIndex >= handler().numberOfOutputs()) {
|
| @@ -882,7 +882,7 @@ void AudioNode::disconnect(AudioParam* destinationParam, unsigned outputIndex, E
|
|
|
| void AudioNode::disconnectWithoutException(unsigned outputIndex)
|
| {
|
| - ASSERT(isMainThread());
|
| + DCHECK(isMainThread());
|
| AbstractAudioContext::AutoLocker locker(context());
|
|
|
| // Sanity check input and output indices.
|
|
|