Bug 1289976. Part 7 - Remove the IsShutdown() check from MediaDecoder::Seek(). r?kaku
1. It is called from DurationChanged() which returns early when IsShutdown() is true.
2. It is called from Play() when IsEnded() is true.
MozReview-Commit-ID: Ixy5OMZHxIm
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -794,17 +794,17 @@ MediaDecoder::Play()
ChangeState(PLAY_STATE_PLAYING);
return NS_OK;
}
nsresult
MediaDecoder::Seek(double aTime, SeekTarget::Type aSeekType, dom::Promise* aPromise /*=nullptr*/)
{
MOZ_ASSERT(NS_IsMainThread());
- NS_ENSURE_TRUE(!IsShutdown(), NS_ERROR_FAILURE);
+ MOZ_ASSERT(!IsShutdown());
UpdateDormantState(false /* aDormantTimeout */, true /* aActivity */);
MOZ_ASSERT(!mIsDormant, "should be out of dormant by now");
MOZ_ASSERT(aTime >= 0.0, "Cannot seek to a negative value.");
int64_t timeUsecs = TimeUnit::FromSeconds(aTime).ToMicroseconds();