Commit 4c50caea authored by haraken@chromium.org's avatar haraken@chromium.org

MediaElementAudioSourceNode::dispose() should call...

MediaElementAudioSourceNode::dispose() should call HTMLMediaElement::setAudioSourceNode(0) in oilpan builds

Currently HTMLMediaElement::setAudioSourceNode(0) is called only in non-oilpan builds.
However, there is no reason why oilpan builds cannot call HTMLMediaElement::setAudioSourceNode(0).
It's better to call it both in oilpan builds and non-oilpan builds and reduce #if branches.

BUG=340522

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

git-svn-id: svn://svn.chromium.org/blink/trunk@179939 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7c71ffd1
......@@ -459,9 +459,11 @@ HTMLMediaElement::~HTMLMediaElement()
m_isFinalizing = true;
#endif
// The m_audioSourceNode is either dead already or it is dying together with
// this HTMLMediaElement which it strongly keeps alive.
#if ENABLE(WEB_AUDIO) && !ENABLE(OILPAN)
// m_audioSourceNode is explicitly cleared by AudioNode::dispose().
// Since AudioNode::dispose() is guaranteed to be always called before
// the AudioNode is destructed, m_audioSourceNode is explicitly cleared
// even if the AudioNode and the HTMLMediaElement die together.
#if ENABLE(WEB_AUDIO)
ASSERT(!m_audioSourceNode);
#endif
clearMediaPlayerAndAudioSourceProviderClientWithoutLocking();
......
......@@ -69,9 +69,7 @@ MediaElementAudioSourceNode::~MediaElementAudioSourceNode()
void MediaElementAudioSourceNode::dispose()
{
#if !ENABLE(OILPAN)
m_mediaElement->setAudioSourceNode(0);
#endif
uninitialize();
AudioSourceNode::dispose();
}
......
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