Bug 1371515. P1 - remove the |IsShutdown()| check from Seek() which is already handled by ShutdownState. r?kaku draft
authorJW Wang <jwwang@mozilla.com>
Fri, 09 Jun 2017 11:41:20 +0800
changeset 591500 b6449e3cc0060e9b11b2a0625da80886b6172acd
parent 591499 31c04d1989de90d66bc86fdb713432076262a62e
child 591501 fadda4c8064495d1831413fe8002ed91401a8ac8
push id63063
push userjwwang@mozilla.com
push dateFri, 09 Jun 2017 03:55:15 +0000
reviewerskaku
bugs1371515
milestone55.0a1
Bug 1371515. P1 - remove the |IsShutdown()| check from Seek() which is already handled by ShutdownState. r?kaku MozReview-Commit-ID: 5V7xCGCsh5j
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -3220,21 +3220,16 @@ void MediaDecoderStateMachine::BufferedR
   }
 }
 
 RefPtr<MediaDecoder::SeekPromise>
 MediaDecoderStateMachine::Seek(const SeekTarget& aTarget)
 {
   MOZ_ASSERT(OnTaskQueue());
 
-  if (IsShutdown()) {
-    return MediaDecoder::SeekPromise::CreateAndReject(/* aIgnored = */ true,
-                                                      __func__);
-  }
-
   // We need to be able to seek in some way
   if (!mMediaSeekable && !mMediaSeekableOnlyInBufferedRanges) {
     LOGW("Seek() should not be called on a non-seekable media");
     return MediaDecoder::SeekPromise::CreateAndReject(/* aIgnored = */ true,
                                                       __func__);
   }
 
   if (aTarget.IsNextFrame() && !HasVideo()) {