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

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

Issue 1261643002: Remove unnecessary condition for audioSourceProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: change audioSourceProvider to return reference Created 5 years, 5 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 | « Source/core/html/HTMLMediaElement.h ('k') | 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 47e62a65b6ab2a764e5c27369bedde49c86df3c5..46ed1fc6c3a364bd3da4d77c3ae027f6635c73b8 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -3072,8 +3072,7 @@ void HTMLMediaElement::userCancelledLoad()
void HTMLMediaElement::clearMediaPlayerAndAudioSourceProviderClientWithoutLocking()
{
#if ENABLE(WEB_AUDIO)
- if (audioSourceProvider())
- audioSourceProvider()->setClient(nullptr);
+ audioSourceProvider().setClient(nullptr);
#endif
if (m_webMediaPlayer) {
m_audioSourceProvider.wrap(nullptr);
@@ -3506,7 +3505,7 @@ void HTMLMediaElement::resetMediaPlayerAndMediaSource()
#if ENABLE(WEB_AUDIO)
if (m_audioSourceNode)
- audioSourceProvider()->setClient(m_audioSourceNode);
+ audioSourceProvider().setClient(m_audioSourceNode);
#endif
}
@@ -3517,8 +3516,7 @@ void HTMLMediaElement::setAudioSourceNode(AudioSourceProviderClient* sourceNode)
m_audioSourceNode = sourceNode;
AudioSourceProviderClientLockScope scope(*this);
- if (audioSourceProvider())
- audioSourceProvider()->setClient(m_audioSourceNode);
+ audioSourceProvider().setClient(m_audioSourceNode);
}
#endif
@@ -3726,8 +3724,8 @@ void HTMLMediaElement::selectInitialTracksIfNecessary()
#if ENABLE(WEB_AUDIO)
void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
{
- if (!Heap::isHeapObjectAlive(m_audioSourceNode) && audioSourceProvider())
- audioSourceProvider()->setClient(nullptr);
+ if (!Heap::isHeapObjectAlive(m_audioSourceNode))
+ audioSourceProvider().setClient(nullptr);
}
void HTMLMediaElement::AudioSourceProviderImpl::wrap(WebAudioSourceProvider* provider)
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/modules/webaudio/MediaElementAudioSourceNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698