Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1188)

Unified Diff: Source/core/html/HTMLMediaElement.cpp

Issue 456273002: MediaElementAudioSourceNode::dispose() should call HTMLMediaElement::setAudioSourceNode(0) in oilpa… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/modules/webaudio/MediaElementAudioSourceNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 117683afc464c1776e0c21df992705af38499f6a..69ff5524040473f27d9d7ea6b83bcb616c13e0e0 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -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();
« no previous file with comments | « no previous file | Source/modules/webaudio/MediaElementAudioSourceNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698