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

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: 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..e4ef3f1f35d2a0d970c9c05b64d53f20c3285071 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -3477,20 +3477,13 @@ 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);
philipj_slow 2015/08/18 07:53:50 Maybe wrap this in a scope like in HTMLMediaElemen
Srirama 2015/08/18 08:38:33 That will be an extra call but there shouldn't be
philipj_slow 2015/08/18 09:00:49 Oh, I didn't see that in the diff.
+ clearMediaPlayerAndAudioSourceProviderClientWithoutLocking();
// We haven't yet found out if any remote routes are available.
m_remoteRoutesAvailable = false;
« 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