Bug 1258966 - Remove unnecessary null-checks of MediaDecoderStateMachine::mReader. r=bechen.
authorJW Wang <jwwang@mozilla.com>
Thu, 24 Mar 2016 16:54:36 +0800
changeset 290499 0bdd199c0911e5f60a84af9bb869832aa2eaf023
parent 290498 9667b7f27279cfacf1c6edf88810a78d036a498c
child 290500 9061abb46bc777c543cb2ef4ec3c411866d25172
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbechen
bugs1258966
milestone48.0a1
Bug 1258966 - Remove unnecessary null-checks of MediaDecoderStateMachine::mReader. r=bechen. MozReview-Commit-ID: HXbFkSd3SZA
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -1251,20 +1251,16 @@ void
 MediaDecoderStateMachine::SetDormant(bool aDormant)
 {
   MOZ_ASSERT(OnTaskQueue());
 
   if (IsShutdown()) {
     return;
   }
 
-  if (!mReader) {
-    return;
-  }
-
   if (mMetadataRequest.Exists()) {
     if (mPendingDormant && mPendingDormant.ref() != aDormant && !aDormant) {
       // We already have a dormant request pending; the new request would have
       // resumed from dormant, we can just cancel any pending dormant requests.
       mPendingDormant.reset();
     } else {
       mPendingDormant = Some(aDormant);
     }