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

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

Issue 1287063006: Clear m_webMediaPlayer at one place in HTMLMediaElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comments Created 5 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 | no next file » | 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 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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698