Bug 1308147. Part 4 - reject mPendingSeek in WaitForCDMState::Exit(). draft
authorJW Wang <jwwang@mozilla.com>
Wed, 19 Oct 2016 18:09:07 +0800
changeset 428543 e0a3f4a5ec1d3fabf5478c42106961233f43629b
parent 428542 6dacb53128be4693604d42b501a172e9ea03ccfb
child 428544 1a29b84bc0c72e470d8bae8acf5144bc9dea395b
push id33335
push userjwwang@mozilla.com
push dateMon, 24 Oct 2016 07:05:42 +0000
bugs1308147
milestone52.0a1
Bug 1308147. Part 4 - reject mPendingSeek in WaitForCDMState::Exit(). MozReview-Commit-ID: H7ChCplXhBM
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -376,18 +376,19 @@ public:
     // where mQueuedSeek must be empty.
     MOZ_ASSERT(!mMaster->mQueuedSeek.Exists());
 
     mPendingDormant = aPendingDormant;
   }
 
   void Exit() override
   {
-    // Transfer the seek job so it is available to the next state.
-    mMaster->mQueuedSeek = Move(mPendingSeek);
+    // mPendingSeek is either moved in HandleCDMProxyReady() or should be
+    // rejected here before transition to SHUTDOWN.
+    mPendingSeek.RejectIfExists(__func__);
   }
 
   State GetState() const override
   {
     return DECODER_STATE_WAIT_FOR_CDM;
   }
 
   bool HandleDormant(bool aDormant) override;