From affa041d7b1f29e969eb2a3e654ab049282ceb95 Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Tue, 30 Sep 2014 16:48:29 +0100 Subject: [PATCH] Backed out changeset aaae54a77270 (bug 1051658) for timeouts in test_bug465498.html on OS X --- content/media/AudioSink.cpp | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/content/media/AudioSink.cpp b/content/media/AudioSink.cpp index 2bb20c61b9e..9d85dadbcb2 100644 --- a/content/media/AudioSink.cpp +++ b/content/media/AudioSink.cpp @@ -55,18 +55,10 @@ AudioSink::Init() nullptr, MEDIA_THREAD_STACK_SIZE); if (NS_FAILED(rv)) { - mStateMachine->OnAudioSinkError(); return rv; } - nsCOMPtr event = NS_NewRunnableMethod(this, &AudioSink::AudioLoop); - rv = mThread->Dispatch(event, NS_DISPATCH_NORMAL); - if (NS_FAILED(rv)) { - mStateMachine->OnAudioSinkError(); - return rv; - } - - return NS_OK; + return mThread->Dispatch(event, NS_DISPATCH_NORMAL); } int64_t @@ -146,8 +138,6 @@ AudioSink::AudioLoop() if (NS_FAILED(InitializeAudioStream())) { NS_WARNING("Initializing AudioStream failed."); - ReentrantMonitorAutoEnter mon(GetReentrantMonitor()); - mStateMachine->OnAudioSinkError(); return; } @@ -207,13 +197,10 @@ AudioSink::InitializeAudioStream() // circumstances, so we take care to drop the decoder monitor while // initializing. RefPtr audioStream(new AudioStream()); - nsresult rv = audioStream->Init(mInfo.mChannels, mInfo.mRate, - mChannel, AudioStream::HighLatency); - if (NS_FAILED(rv)) { - audioStream->Shutdown(); - return rv; - } - + audioStream->Init(mInfo.mChannels, mInfo.mRate, + mChannel, AudioStream::HighLatency); + // TODO: Check Init's return value and bail on error. Unfortunately this + // causes some tests to fail due to playback failing. ReentrantMonitorAutoEnter mon(GetReentrantMonitor()); mAudioStream = audioStream; UpdateStreamSettings();