Chromium Code Reviews| Index: Source/core/html/HTMLMediaElement.cpp |
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
| index 7aaf7d3a7165561a718cdaf70a6841012a38b1fb..9e387d720bc9d313683a41f986de8d9a3cf5d4cc 100644 |
| --- a/Source/core/html/HTMLMediaElement.cpp |
| +++ b/Source/core/html/HTMLMediaElement.cpp |
| @@ -286,7 +286,7 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum |
| , m_textTracks(nullptr) |
| , m_ignoreTrackDisplayUpdate(0) |
| #if ENABLE(WEB_AUDIO) |
| - , m_audioSourceNode(0) |
| + , m_audioSourceNode(nullptr) |
| #endif |
| { |
| ASSERT(RuntimeEnabledFeatures::mediaEnabled()); |
| @@ -363,7 +363,16 @@ HTMLMediaElement::~HTMLMediaElement() |
| document().incrementLoadEventDelayCount(); |
| #endif |
| +#if ENABLE(OILPAN) |
| +#if ENABLE(WEB_AUDIO) |
| + if (audioSourceProvider()) |
| + audioSourceProvider()->setClient(0); |
| +#endif |
| + m_player.clear(); |
| +#else |
| + ASSERT(!m_audioSourceNode); |
|
haraken
2014/05/21 16:35:58
I'm curious why you added this ASSERT. If m_audioS
zerny-chromium
2014/05/22 05:54:32
Exactly. That is why I inlined the reduced code in
Mads Ager (chromium)
2014/05/22 08:02:56
Maybe we can split this into two methods:
clearMe
|
| clearMediaPlayerAndAudioSourceProviderClient(); |
| +#endif |
| #if !ENABLE(OILPAN) |
| document().decrementLoadEventDelayCount(); |
| @@ -3652,6 +3661,7 @@ void HTMLMediaElement::trace(Visitor* visitor) |
| visitor->trace(m_nextChildNodeToConsider); |
| visitor->trace(m_textTracks); |
| visitor->trace(m_textTracksWhenResourceSelectionBegan); |
| + visitor->trace(m_audioSourceNode); |
| WillBeHeapSupplementable<HTMLMediaElement>::trace(visitor); |
| HTMLElement::trace(visitor); |
| } |