Bug 1182967: Reject metadata promise on shutdown. r=bholley
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 16 Jul 2015 09:59:12 +1000
changeset 253131 a5c54b9ebb83a09dc93472aecde1fc442ea66161
parent 253130 29f28c8cd976c13dd856f3b8251ff8e29f4a5b15
child 253132 629be61818243fbbf1127efa140219292f762c2d
push id29061
push userryanvm@gmail.com
push dateThu, 16 Jul 2015 18:53:45 +0000
treeherdermozilla-central@a0f4a688433d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1182967
milestone42.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 1182967: Reject metadata promise on shutdown. r=bholley
dom/media/MediaFormatReader.cpp
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -94,16 +94,17 @@ MediaFormatReader::~MediaFormatReader()
 }
 
 nsRefPtr<ShutdownPromise>
 MediaFormatReader::Shutdown()
 {
   MOZ_ASSERT(OnTaskQueue());
 
   mDemuxerInitRequest.DisconnectIfExists();
+  mMetadataPromise.RejectIfExists(ReadMetadataFailureReason::METADATA_ERROR, __func__);
   mSeekPromise.RejectIfExists(NS_ERROR_FAILURE, __func__);
   mSkipRequest.DisconnectIfExists();
 
   if (mAudio.mDecoder) {
     Flush(TrackInfo::kAudioTrack);
     if (mAudio.HasPromise()) {
       mAudio.RejectPromise(CANCELED, __func__);
     }