Chromium Code Reviews| Index: Source/modules/webaudio/AudioNode.cpp |
| diff --git a/Source/modules/webaudio/AudioNode.cpp b/Source/modules/webaudio/AudioNode.cpp |
| index 4c0c9d51ca4c780061835b9279146c08476825b0..0e6ee07acef056c2bfd8e0d0ffc6046fcfc2039f 100644 |
| --- a/Source/modules/webaudio/AudioNode.cpp |
| +++ b/Source/modules/webaudio/AudioNode.cpp |
| @@ -58,6 +58,9 @@ AudioNode::AudioNode(AudioContext* context, float sampleRate) |
| , m_connectionRefCount(0) |
| , m_isMarkedForDeletion(false) |
| , m_isDisabled(false) |
| +#ifndef NDEBUG |
|
tkent
2014/08/11 10:13:06
#if ENABLE(ASSERT)
haraken
2014/08/11 10:32:59
Done.
|
| + , m_disposeIsCalled(false) |
| +#endif |
| , m_channelCount(2) |
| , m_channelCountMode(Max) |
| , m_channelInterpretation(AudioBus::Speakers) |
| @@ -77,6 +80,7 @@ AudioNode::AudioNode(AudioContext* context, float sampleRate) |
| AudioNode::~AudioNode() |
| { |
| + ASSERT(m_disposeIsCalled); |
| --s_instanceCount; |
| #if DEBUG_AUDIONODE_REFERENCES |
| --s_nodeCount[nodeType()]; |
| @@ -109,6 +113,9 @@ void AudioNode::dispose() |
| m_isMarkedForDeletion = true; |
| #endif |
| context()->unmarkDirtyNode(*this); |
| +#ifndef NDEBUG |
|
tkent
2014/08/11 10:13:06
Ditto.
|
| + m_disposeIsCalled = true; |
| +#endif |
| } |
| String AudioNode::nodeTypeName() const |