Bug 1289976. Part 9 - Remove the IsShutdown() check from MediaDecoder::StartDormantTimer(). r=kaku
☠☠ backed out by 99165d03ee19 ☠ ☠
authorJW Wang <jwwang@mozilla.com>
Wed, 27 Jul 2016 10:52:01 +0800
changeset 347483 2931db85cc99c9fd91394385479d5f35e0441d27
parent 347482 f648be2df9eca7ea956b83f21e326b155fcc5956
child 347484 ba01eb85da0a2b60d2061ef3ca06ac6f435d434f
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [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 9 - Remove the IsShutdown() check from MediaDecoder::StartDormantTimer(). r=kaku We don't need to check IsShutdown() which is a subset of |mPlayState != PLAY_STATE_PAUSED && !IsEnded()|. MozReview-Commit-ID: BjYoLOLuPfC
dom/media/MediaDecoder.cpp
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -381,26 +381,21 @@ MediaDecoder::DormantTimerExpired(nsITim
   decoder->UpdateDormantState(true /* aDormantTimeout */,
                               false /* aActivity */);
 }
 
 void
 MediaDecoder::StartDormantTimer()
 {
   MOZ_ASSERT(NS_IsMainThread());
-  if (!IsHeuristicDormantSupported()) {
-    return;
-  }
 
-  if (mIsHeuristicDormant ||
-      IsShutdown() ||
+  if (!IsHeuristicDormantSupported() ||
+      mIsHeuristicDormant ||
       mIsVisible ||
-      (mPlayState != PLAY_STATE_PAUSED &&
-       !IsEnded()))
-  {
+      (mPlayState != PLAY_STATE_PAUSED && !IsEnded())) {
     return;
   }
 
   if (!mDormantTimer) {
     mDormantTimer = do_CreateInstance("@mozilla.org/timer;1");
   }
   mDormantTimer->InitWithFuncCallback(&MediaDecoder::DormantTimerExpired,
                                       this,