Bug 1330889. Part 2 - remove some mState checks from MDSM::ResetDecode. r=kikuo
authorJW Wang <jwwang@mozilla.com>
Fri, 13 Jan 2017 15:09:11 +0800
changeset 374566 befabe73c225a9b2e7ed205063010ac402c6d57b
parent 374565 359372e06f84b0ccd8f028929d1407c202f3d4b9
child 374567 4971ca440d80abc6a260e7f7af2f053c611881d5
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskikuo
bugs1330889
milestone53.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 1330889. Part 2 - remove some mState checks from MDSM::ResetDecode. r=kikuo We want to separate mechanism from policy. The policy should be encoded in the state objects which will decided whether to call ResetDecode(). It is also possible to add a new state which has to call ResetDecode(). MozReview-Commit-ID: 3orxW4FNuVD
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -3310,24 +3310,16 @@ MediaDecoderStateMachine::RunStateMachin
 }
 
 void
 MediaDecoderStateMachine::ResetDecode(TrackSet aTracks)
 {
   MOZ_ASSERT(OnTaskQueue());
   DECODER_LOG("MediaDecoderStateMachine::Reset");
 
-  // We should be resetting because we're seeking, shutting down, or entering
-  // dormant state. We could also be in the process of going dormant, and have
-  // just switched to exiting dormant before we finished entering dormant,
-  // hence the DECODING_NONE case below.
-  MOZ_ASSERT(IsShutdown() ||
-             mState == DECODER_STATE_SEEKING ||
-             mState == DECODER_STATE_DORMANT);
-
   // Assert that aTracks specifies to reset the video track because we
   // don't currently support resetting just the audio track.
   MOZ_ASSERT(aTracks.contains(TrackInfo::kVideoTrack));
 
   if (aTracks.contains(TrackInfo::kVideoTrack)) {
     mDecodedVideoEndTime = 0;
     mVideoCompleted = false;
     VideoQueue().Reset();