Bug 1585843 - Don't try to reject disconnected promise in AudioSink::Errored. r=padenot
authorMatthew Gregan <kinetik@flim.org>
Thu, 03 Oct 2019 07:32:29 +0000
changeset 496146 3418a8c2baa6d3e2d3246032b9a9268480bbe90a
parent 496145 ec52c8aa2b8e2291f542b392a345a528f95d4407
child 496147 bf0900c02d78aa1816a465ece607bbd2d5a81566
push id36645
push userrmaries@mozilla.com
push dateThu, 03 Oct 2019 16:42:51 +0000
treeherdermozilla-central@001e665b6b2c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1585843
milestone71.0a1
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
Bug 1585843 - Don't try to reject disconnected promise in AudioSink::Errored. r=padenot Differential Revision: https://phabricator.services.mozilla.com/D48002
dom/media/mediasink/AudioSink.cpp
--- a/dom/media/mediasink/AudioSink.cpp
+++ b/dom/media/mediasink/AudioSink.cpp
@@ -299,17 +299,17 @@ void AudioSink::Drained() {
   SINK_LOG("Drained");
   mPlaybackComplete = true;
   mEndedPromise.ResolveIfExists(true, __func__);
 }
 
 void AudioSink::Errored() {
   SINK_LOG("Errored");
   mPlaybackComplete = true;
-  mEndedPromise.Reject(NS_ERROR_FAILURE, __func__);
+  mEndedPromise.RejectIfExists(NS_ERROR_FAILURE, __func__);
 }
 
 void AudioSink::CheckIsAudible(const AudioData* aData) {
   MOZ_ASSERT(aData);
 
   bool isAudible = aData->IsAudible();
   if (isAudible != mIsAudioDataAudible) {
     mIsAudioDataAudible = isAudible;