Bug 1388612. P2 - remove the call to NotifySuspendedStatusChanged() in MediaDecoder::FirstFrameLoaded(). draft
authorJW Wang <jwwang@mozilla.com>
Wed, 09 Aug 2017 16:13:51 +0800
changeset 643700 24bacdec25bc7a2630e7c7dfdef81dbefd1985aa
parent 643699 78aab6fc4d85cd3fed5a0802809c1284fa4174ca
child 643707 c3178c2df13515dd44f98afa7da1e0bf905be40b
push id73192
push userjwwang@mozilla.com
push dateThu, 10 Aug 2017 02:34:54 +0000
bugs1388612
milestone57.0a1
Bug 1388612. P2 - remove the call to NotifySuspendedStatusChanged() in MediaDecoder::FirstFrameLoaded(). Following P1, cache suspend status changes will be notified when necessary. If not, it would be a bug that should be fixed. We shouldn't wallpaper the issue by calling NotifySuspendedStatusChanged() manually. MozReview-Commit-ID: 9EbybTiOOIO
dom/media/MediaDecoder.cpp
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -817,20 +817,16 @@ MediaDecoder::FirstFrameLoaded(nsAutoPtr
   // The element can run javascript via events
   // before reaching here, so only change the
   // state if we're still set to the original
   // loading state.
   if (mPlayState == PLAY_STATE_LOADING) {
     ChangeState(mNextState);
   }
 
-  // Run NotifySuspendedStatusChanged now to give us a chance to notice
-  // that autoplay should run.
-  NotifySuspendedStatusChanged();
-
   // GetOwner()->FirstFrameLoaded() might call us back. Put it at the bottom of
   // this function to avoid unexpected shutdown from reentrant calls.
   if (aEventVisibility != MediaDecoderEventVisibility::Suppressed) {
     GetOwner()->FirstFrameLoaded();
   }
 }
 
 void