summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-01-11 10:03:25 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-01-11 10:03:25 +0100
commitd11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (patch)
treeb318cf594dc1da2fa48224005945c9157f35bb41 /Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
parent6300a96eca9f152b379f1bcf3d9efdc5572d989a (diff)
downloadqtwebkit-d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9.tar.gz
Imported WebKit commit 75bb2fc5882d2e1b3d5572c2961507996cbca5e3 (http://svn.webkit.org/repository/webkit/trunk@104681)
Diffstat (limited to 'Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp')
-rw-r--r--Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
index dd2bc221e..891c31f3f 100644
--- a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
+++ b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
@@ -31,11 +31,11 @@
#include "platform/WebCString.h"
#include "platform/WebCanvas.h"
#include "platform/WebKitPlatformSupport.h"
-#include "platform/WebMimeRegistry.h"
#include "platform/WebRect.h"
#include "platform/WebSize.h"
#include "platform/WebString.h"
#include "platform/WebURL.h"
+#include <public/WebMimeRegistry.h>
#if USE(ACCELERATED_COMPOSITING)
#include "RenderLayerCompositor.h"
@@ -237,6 +237,9 @@ void WebMediaPlayerClientImpl::load(const String& url)
m_url = url;
if (m_preload == MediaPlayer::None) {
+#if ENABLE(WEB_AUDIO)
+ m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's WebAudioSourceProvider.
+#endif
m_webMediaPlayer.clear();
m_delayingLoad = true;
} else
@@ -245,6 +248,10 @@ void WebMediaPlayerClientImpl::load(const String& url)
void WebMediaPlayerClientImpl::loadInternal()
{
+#if ENABLE(WEB_AUDIO)
+ m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's WebAudioSourceProvider.
+#endif
+
Frame* frame = static_cast<HTMLMediaElement*>(m_mediaPlayer->mediaPlayerClient())->document()->frame();
m_webMediaPlayer = createWebMediaPlayer(this, frame);
if (m_webMediaPlayer) {
@@ -688,8 +695,6 @@ WebMediaPlayerClientImpl::WebMediaPlayerClientImpl()
#if ENABLE(WEB_AUDIO)
void WebMediaPlayerClientImpl::AudioSourceProviderImpl::wrap(WebAudioSourceProvider* provider)
{
- if (m_webAudioSourceProvider && m_webAudioSourceProvider != provider)
- m_webAudioSourceProvider->setClient(0);
m_webAudioSourceProvider = provider;
if (m_webAudioSourceProvider)
m_webAudioSourceProvider->setClient(m_client.get());