Backed out changeset 10dc6af46fbf (bug 1496281) for build bustage at builds/worker/workspace/build/src/dom/media/mediasink/AudioSink.cpp on a CLOSED TREE
authorDaniel Varga <dvarga@mozilla.com>
Sat, 13 Oct 2018 00:04:06 +0300
changeset 496676 7571ffba8492b3d03a40c17368ebc1fb0921f10c
parent 496675 9626e5c3b4a44d81d34ee5f9a2e65c005c59cc75
child 496677 06020ce3e33a83bc1dd1514aac97beacdab1505f
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1496281
milestone64.0a1
backs out10dc6af46fbf04a72b7940a3b715c87f9f32cee6
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 10dc6af46fbf (bug 1496281) for build bustage at builds/worker/workspace/build/src/dom/media/mediasink/AudioSink.cpp on a CLOSED TREE
dom/media/mediasink/AudioSink.cpp
--- a/dom/media/mediasink/AudioSink.cpp
+++ b/dom/media/mediasink/AudioSink.cpp
@@ -71,20 +71,16 @@ AudioSink::~AudioSink()
 {
 }
 
 nsresult
 AudioSink::Init(const PlaybackParams& aParams, RefPtr<GenericPromise>& aEndPromise)
 {
   MOZ_ASSERT(mOwnerThread->IsCurrentThreadIn());
 
-  if (mAudioQueue.IsFinished()) {
-    return GenericPromise::CreateAndResolve(true, __func__);
-  }
-
   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
@@ -130,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__);