Commit 8886de05 authored by haraken@chromium.org's avatar haraken@chromium.org

AudioContext::removeAutomaticPullNode() should be called in AudioNode::dispose()

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

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

BUG=340522

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

git-svn-id: svn://svn.chromium.org/blink/trunk@180232 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 3b959393
...@@ -803,12 +803,6 @@ void AudioContext::markForDeletion(AudioNode* node) ...@@ -803,12 +803,6 @@ void AudioContext::markForDeletion(AudioNode* node)
m_nodesToDelete.append(node); m_nodesToDelete.append(node);
else else
m_nodesMarkedForDeletion.append(node); m_nodesMarkedForDeletion.append(node);
// This is probably the best time for us to remove the node from automatic pull list,
// since all connections are gone and we hold the graph lock. Then when handlePostRenderTasks()
// gets a chance to schedule the deletion work, updateAutomaticPullNodes() also gets a chance to
// modify m_renderingAutomaticPullNodes.
removeAutomaticPullNode(node);
} }
void AudioContext::scheduleNodeDeletion() void AudioContext::scheduleNodeDeletion()
......
...@@ -108,8 +108,9 @@ void AudioNode::dispose() ...@@ -108,8 +108,9 @@ void AudioNode::dispose()
{ {
ASSERT(isMainThread()); ASSERT(isMainThread());
ASSERT(context()->isGraphOwner()); ASSERT(context()->isGraphOwner());
#if ENABLE(OILPAN)
context()->removeAutomaticPullNode(this); context()->removeAutomaticPullNode(this);
#if ENABLE(OILPAN)
for (unsigned i = 0; i < m_outputs.size(); ++i) for (unsigned i = 0; i < m_outputs.size(); ++i)
output(i)->disconnectAll(); output(i)->disconnectAll();
#endif #endif
......
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