Backed out changeset 0f20566c7b2f (bug 1593739) for causing assertion in StateWatching.h CLOSED TREE
authorNoemi Erli <nerli@mozilla.com>
Fri, 15 Nov 2019 14:07:06 +0200
changeset 502159 d215b3534e043455cad3bf14a90e5f80e9f8cdd0
parent 502158 f03a850e3f537a33d65889797230222b305f7f7f
child 502160 8a556d81b030513a068e8820f90e3940e675fbda
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1593739
milestone72.0a1
backs out0f20566c7b2fa7b1204e432828940fd81ab2a197
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
Backed out changeset 0f20566c7b2f (bug 1593739) for causing assertion in StateWatching.h CLOSED TREE
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -1687,17 +1687,16 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSelectedVideoStreamTrack)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPendingPlayPromises)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSeekDOMPromise)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSetMediaKeysDOMPromise)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLMediaElement,
                                                 nsGenericHTMLElement)
-  tmp->mWatchManager.Shutdown();
   tmp->RemoveMutationObserver(tmp);
   if (tmp->mSrcStream) {
     // Need to EndMediaStreamPlayback to clear mSrcStream and make sure
     // everything gets unhooked correctly.
     tmp->EndSrcMediaStreamPlayback();
   }
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mSrcAttrStream)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mMediaSource)
@@ -5070,30 +5069,27 @@ void HTMLMediaElement::EndSrcMediaStream
   }
   if (mFirstFrameListener) {
     mSelectedVideoStreamTrack->RemoveVideoOutput(mFirstFrameListener);
   }
   mSelectedVideoStreamTrack = nullptr;
   mFirstFrameListener = nullptr;
 
   if (mMediaStreamRenderer) {
-    if (!mWatchManager.IsShutdown()) {
-      mWatchManager.Unwatch(
-          mPaused, &HTMLMediaElement::UpdateSrcStreamPotentiallyPlaying);
-      mWatchManager.Unwatch(
-          mReadyState, &HTMLMediaElement::UpdateSrcStreamPotentiallyPlaying);
-      mWatchManager.Unwatch(
-          mSrcStreamPlaybackEnded,
-          &HTMLMediaElement::UpdateSrcStreamPotentiallyPlaying);
-      mWatchManager.Unwatch(
-          mSrcStreamPlaybackEnded,
-          &HTMLMediaElement::UpdateSrcStreamReportPlaybackEnded);
-      mWatchManager.Unwatch(mMediaStreamRenderer->CurrentGraphTime(),
-                            &HTMLMediaElement::UpdateSrcStreamTime);
-    }
+    mWatchManager.Unwatch(mPaused,
+                          &HTMLMediaElement::UpdateSrcStreamPotentiallyPlaying);
+    mWatchManager.Unwatch(mReadyState,
+                          &HTMLMediaElement::UpdateSrcStreamPotentiallyPlaying);
+    mWatchManager.Unwatch(mSrcStreamPlaybackEnded,
+                          &HTMLMediaElement::UpdateSrcStreamPotentiallyPlaying);
+    mWatchManager.Unwatch(
+        mSrcStreamPlaybackEnded,
+        &HTMLMediaElement::UpdateSrcStreamReportPlaybackEnded);
+    mWatchManager.Unwatch(mMediaStreamRenderer->CurrentGraphTime(),
+                          &HTMLMediaElement::UpdateSrcStreamTime);
     mMediaStreamRenderer->Shutdown();
     mMediaStreamRenderer = nullptr;
   }
 
   mSrcStream->UnregisterTrackListener(mMediaStreamTrackListener.get());
   mMediaStreamTrackListener = nullptr;
   mSrcStreamPlaybackEnded = false;
   mSrcStreamReportPlaybackEnded = false;