Bug 1331329. Part 1 - remove EnterDormant() which is a one-line function. r=kaku
authorJW Wang <jwwang@mozilla.com>
Mon, 16 Jan 2017 16:39:56 +0800
changeset 374661 7df5aa0e7cfe722a62b1ee01af86984cf36101b7
parent 374660 fd57bcd5daf2e1dd79021f4fa7ec659ad4b40d21
child 374662 09fb9831233593b5c88028ff9400993acd680559
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaku
bugs1331329
milestone53.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 1331329. Part 1 - remove EnterDormant() which is a one-line function. r=kaku MozReview-Commit-ID: AaUPDAm24iB
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -807,46 +807,41 @@ private:
         (DonePrerollingAudio() || mMaster->IsWaitingAudioData()) &&
         (DonePrerollingVideo() || mMaster->IsWaitingVideoData())) {
       mIsPrerolling = false;
       // Check if we can start playback.
       mMaster->ScheduleStateMachine();
     }
   }
 
-  void EnterDormant()
-  {
-    SetState<DormantState>();
-  }
-
   void StartDormantTimer()
   {
     if (!mMaster->mMediaSeekable) {
       // Don't enter dormant if the media is not seekable because we need to
       // seek when exiting dormant.
       return;
     }
 
     auto timeout = MediaPrefs::DormantOnPauseTimeout();
     if (timeout < 0) {
       // Disabled when timeout is negative.
       return;
     } else if (timeout == 0) {
       // Enter dormant immediately without scheduling a timer.
-      EnterDormant();
+      SetState<DormantState>();
       return;
     }
 
     TimeStamp target = TimeStamp::Now() +
       TimeDuration::FromMilliseconds(timeout);
 
     mDormantTimer.Ensure(target,
       [this] () {
         mDormantTimer.CompleteRequest();
-        EnterDormant();
+        SetState<DormantState>();
       }, [this] () {
         mDormantTimer.CompleteRequest();
       });
   }
 
   // Time at which we started decoding.
   TimeStamp mDecodeStartTime;