Backed out changeset 25bff27f9944 (bug 1496281) requested for causing bug1498953 CLOSED TREE
authorCiure Andrei <aciure@mozilla.com>
Mon, 15 Oct 2018 21:47:32 +0300
changeset 497055 f6e9edf3db436e5dbaf2ff199f43c571e231515b
parent 497054 ddd7b581697d9ccff863b6901ef9e01e5772b2e4
child 497056 45a7ec8b70219b47b26eec692b17b6f7e73fc098
push id9996
push userarchaeopteryx@coole-files.de
push dateThu, 18 Oct 2018 18:37:15 +0000
treeherdermozilla-beta@8efe26839243 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1496281, 1498953
milestone64.0a1
backs out25bff27f9944c7bfea0372c2b6dc55e35977fb83
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 25bff27f9944 (bug 1496281) requested for causing bug1498953 CLOSED TREE
dom/media/mediasink/AudioSink.cpp
--- a/dom/media/mediasink/AudioSink.cpp
+++ b/dom/media/mediasink/AudioSink.cpp
@@ -71,21 +71,16 @@ AudioSink::~AudioSink()
 {
 }
 
 nsresult
 AudioSink::Init(const PlaybackParams& aParams, RefPtr<GenericPromise>& aEndPromise)
 {
   MOZ_ASSERT(mOwnerThread->IsCurrentThreadIn());
 
-  if (mAudioQueue.IsFinished()) {
-    aEndPromise = GenericPromise::CreateAndResolve(true, __func__);
-    return NS_OK;
-  }
-
   mAudioQueueListener = mAudioQueue.PushEvent().Connect(
     mOwnerThread, this, &AudioSink::OnAudioPushed);
   mAudioQueueFinishListener = mAudioQueue.FinishEvent().Connect(
     mOwnerThread, this, &AudioSink::NotifyAudioNeeded);
   mProcessedQueueListener = mProcessedQueue.PopEvent().Connect(
     mOwnerThread, this, &AudioSink::OnAudioPopped);
 
   // To ensure at least one audio packet will be popped from AudioQueue and
@@ -131,19 +126,19 @@ AudioSink::HasUnplayedFrames()
          (mAudioStream && mAudioStream->GetPositionInFrames() + 1 < total);
 }
 
 void
 AudioSink::Shutdown()
 {
   MOZ_ASSERT(mOwnerThread->IsCurrentThreadIn());
 
-  mAudioQueueListener.DisconnectIfExists();
-  mAudioQueueFinishListener.DisconnectIfExists();
-  mProcessedQueueListener.DisconnectIfExists();
+  mAudioQueueListener.Disconnect();
+  mAudioQueueFinishListener.Disconnect();
+  mProcessedQueueListener.Disconnect();
 
   if (mAudioStream) {
     mAudioStream->Shutdown();
     mAudioStream = nullptr;
   }
   mProcessedQueue.Reset();
   mProcessedQueue.Finish();
   mEndPromise.ResolveIfExists(true, __func__);