| Index: Source/core/html/HTMLMediaElement.cpp
|
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
|
| index 608390e31002930cf2cd7594880257f0dc9ea7d3..5433bb6c00d4712a3c2a91b2e6bca622e02e7928 100644
|
| --- a/Source/core/html/HTMLMediaElement.cpp
|
| +++ b/Source/core/html/HTMLMediaElement.cpp
|
| @@ -3477,19 +3477,14 @@ void* HTMLMediaElement::preDispatchEventHandler(Event* event)
|
| return nullptr;
|
| }
|
|
|
| -// TODO(srirama.m): Refactor this and other relevant methods and have a
|
| -// single method for clearing the mediaplayer and its stuff.
|
| +// TODO(srirama.m): Refactor this and clearMediaPlayer to the extent possible.
|
| void HTMLMediaElement::resetMediaPlayerAndMediaSource()
|
| {
|
| - AudioSourceProviderClientLockScope scope(*this);
|
| -
|
| closeMediaSource();
|
|
|
| - if (m_webMediaPlayer) {
|
| -#if ENABLE(WEB_AUDIO)
|
| - m_audioSourceProvider.wrap(nullptr);
|
| -#endif
|
| - m_webMediaPlayer.clear();
|
| + {
|
| + AudioSourceProviderClientLockScope scope(*this);
|
| + clearMediaPlayerAndAudioSourceProviderClientWithoutLocking();
|
| }
|
|
|
| // We haven't yet found out if any remote routes are available.
|
|
|