Bug 1300497. Part 6 - remove the call to |SetState(DECODER_STATE_SHUTDOWN)| from DecodeError(). r=kaku
authorJW Wang <jwwang@mozilla.com>
Tue, 06 Sep 2016 15:33:20 +0800
changeset 313117 afb8c6617510e7a8a0132e8412ca1aa8c049933a
parent 313116 da34e47f89b50a8dfc9827139cab693e1de62b97
child 313118 bd28be90aed86db495c8f0fdb6fc86c47c4484ea
child 313184 b867d9ef5e6417e26085eb19654b9e8c7ca0a512
push id30671
push usercbook@mozilla.com
push dateThu, 08 Sep 2016 09:59:51 +0000
treeherdermozilla-central@bd28be90aed8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaku
bugs1300497
milestone51.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 1300497. Part 6 - remove the call to |SetState(DECODER_STATE_SHUTDOWN)| from DecodeError(). r=kaku So we have only one place to transition to the SHUTDOWN state which is Shutdown(). MozReview-Commit-ID: 6MNISCea94Q
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -1993,26 +1993,18 @@ bool MediaDecoderStateMachine::HasLowUnd
                                media::TimeUnit::FromMicroseconds(std::min(endOfDecodedData + aUsecs, Duration().ToMicroseconds())));
   return endOfDecodedData != INT64_MAX && !mBuffered.Ref().Contains(interval);
 }
 
 void
 MediaDecoderStateMachine::DecodeError()
 {
   MOZ_ASSERT(OnTaskQueue());
-
-  if (IsShutdown()) {
-    // Already shutdown.
-    return;
-  }
-
+  MOZ_ASSERT(!IsShutdown());
   DECODER_WARN("Decode error");
-  // Change state to SHUTDOWN so we have no more processing.
-  SetState(DECODER_STATE_SHUTDOWN);
-
   // Notify the decode error and MediaDecoder will shut down MDSM.
   mOnPlaybackEvent.Notify(MediaEventType::DecodeError);
 }
 
 void
 MediaDecoderStateMachine::OnMetadataRead(MetadataHolder* aMetadata)
 {
   MOZ_ASSERT(OnTaskQueue());