Commit 1571a0f5 authored by haraken@chromium.org's avatar haraken@chromium.org

AudioNodeOutput::disconnectAll() should be called in AudioNode::dispose()

Currently, in oilpan builds, AudioNodeOutput::disconnectAll() is called in AudioNode::dispose().
In non-oilpan builds, AudioNodeOutput::disconnectAll() is called in AudioNode::finishDeref().
We don't want to have different call paths between oilpan builds and non-oilpan builds.

Given that AudioNodeOutput::disconnectAll() should be called when the AudioNode is destructed
(but before the associated AudioContext is gone), AudioNodeOutput::disconnectAll() should always
be called in AudioNode::dispose().

BUG=340522

Review URL: https://codereview.chromium.org/467683002

git-svn-id: svn://svn.chromium.org/blink/trunk@180277 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 445244f2
......@@ -110,10 +110,8 @@ void AudioNode::dispose()
ASSERT(context()->isGraphOwner());
context()->removeAutomaticPullNode(this);
#if ENABLE(OILPAN)
for (unsigned i = 0; i < m_outputs.size(); ++i)
output(i)->disconnectAll();
#endif
context()->unmarkDirtyNode(*this);
#if ENABLE(ASSERT)
m_didCallDispose = true;
......@@ -608,10 +606,6 @@ void AudioNode::finishDeref()
#endif
if (!m_normalRefCount && !m_isMarkedForDeletion) {
// All references are gone - we need to go away.
for (unsigned i = 0; i < m_outputs.size(); ++i)
output(i)->disconnectAll(); // This will deref() nodes we're connected to.
// Mark for deletion at end of each render quantum or when context shuts
// down.
context()->markForDeletion(this);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment