Bug 1289976. Part 7 - Remove the IsShutdown() check from MediaDecoder::Seek(). r=kaku
☠☠ backed out by 3bc17ae80dc8 ☠ ☠
authorJW Wang <jwwang@mozilla.com>
Wed, 27 Jul 2016 10:49:14 +0800
changeset 349551 cd25be005e38d0d6cd63a1681924a1ca65b693cf
parent 349550 ce6b4f84c86eb60cd384014b183aae50845be0b0
child 349552 f648be2df9eca7ea956b83f21e326b155fcc5956
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaku
bugs1289976
milestone50.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 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
dom/media/MediaDecoder.cpp
--- 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();