Bug 1341200. Part 9 - remove unused mShuttingDown. draft
authorJW Wang <jwwang@mozilla.com>
Mon, 27 Feb 2017 00:17:16 +0800
changeset 493141 6ef163dbeecce91ce91efec55db48f24869913ec
parent 493140 8a21649b36a0bbe11c7efb788bcc57bcb471977d
child 493142 74cd7a208c8f39452879593326d98a04944534be
push id47651
push userjwwang@mozilla.com
push dateFri, 03 Mar 2017 09:41:12 +0000
bugs1341200
milestone54.0a1
Bug 1341200. Part 9 - remove unused mShuttingDown. MozReview-Commit-ID: 8OWgOB07rEP
dom/media/MediaFormatReader.cpp
dom/media/MediaFormatReader.h
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -1931,17 +1931,17 @@ MediaFormatReader::DecodeDemuxedSamples(
 void
 MediaFormatReader::HandleDemuxedSamples(
   TrackType aTrack, AbstractMediaDecoder::AutoNotifyDecoded& aA)
 {
   MOZ_ASSERT(OnTaskQueue());
 
   auto& decoder = GetDecoderData(aTrack);
 
-  if (decoder.mFlushing || decoder.mShuttingDown) {
+  if (decoder.mFlushing) {
     LOGV("Decoder operation in progress, let it complete.");
     return;
   }
 
   if (decoder.mQueuedSamples.IsEmpty()) {
     return;
   }
 
@@ -2305,26 +2305,26 @@ MediaFormatReader::Update(TrackType aTra
     }
     return;
   }
 
   bool needInput = NeedInput(decoder);
 
   LOGV(
     "Update(%s) ni=%d no=%d in:%" PRIu64 " out:%" PRIu64
-    " qs=%u decoding:%d flushing:%d shutdown:%d pending:%u waiting:%d sid:%u",
+    " qs=%u decoding:%d flushing:%d desc:%s pending:%u waiting:%d sid:%u",
     TrackTypeToStr(aTrack),
     needInput,
     needOutput,
     decoder.mNumSamplesInput,
     decoder.mNumSamplesOutput,
     uint32_t(size_t(decoder.mSizeOfQueue)),
     decoder.mDecodeRequest.Exists(),
     decoder.mFlushing,
-    decoder.mShuttingDown,
+    decoder.mDescription,
     uint32_t(decoder.mOutput.Length()),
     decoder.mWaitingForData,
     decoder.mLastStreamSourceID);
 
   if ((decoder.mWaitingForData
        && (!decoder.mTimeThreshold || decoder.mTimeThreshold.ref().mWaiting))
       || (decoder.mWaitingForKey && decoder.mDecodeRequest.Exists())) {
     // Nothing more we can do at present.
--- a/dom/media/MediaFormatReader.h
+++ b/dom/media/MediaFormatReader.h
@@ -244,17 +244,16 @@ private:
     }
 
     // MediaDataDecoder handler's variables.
     MozPromiseRequestHolder<MediaDataDecoder::DecodePromise> mDecodeRequest;
     bool mFlushing; // True if flush is in action.
     // Set to true if the last operation run on the decoder was a flush.
     bool mFlushed;
     MozPromiseHolder<ShutdownPromise> mShutdownPromise;
-    bool mShuttingDown = false; // True if shutdown is in action.
 
     MozPromiseRequestHolder<MediaDataDecoder::DecodePromise> mDrainRequest;
     DrainState mDrainState;
     bool HasPendingDrain() const
     {
       return mDrainState != DrainState::None;
     }
     void RequestDrain()