Bug 1559568 - Remove extraneous dtor guard in OutputStreamData. r=padenot
authorAndreas Pehrson <apehrson@mozilla.com>
Thu, 04 Jul 2019 11:01:59 +0000
changeset 540887 e3b2bdab221f3a78a42ea0e097cbcb0f45f43798
parent 540886 e1f73a7e8dc61e41f2c4045a20ef2be3c84c295d
child 540888 34b24a5f927afaba5b8839cbf9623aa155515a0a
push id11533
push userarchaeopteryx@coole-files.de
push dateMon, 08 Jul 2019 18:18:03 +0000
treeherdermozilla-beta@f4452e031aed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1559568
milestone69.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 1559568 - Remove extraneous dtor guard in OutputStreamData. r=padenot MediaInputPort::Destroy must always be called, or it will not remove its strong ref to the MediaStreamGraph. The guard is not even needed, since MediaInputPort::Disconnect is idempotent. Differential Revision: https://phabricator.services.mozilla.com/D36571
dom/media/mediasink/OutputStreamManager.cpp
--- a/dom/media/mediasink/OutputStreamManager.cpp
+++ b/dom/media/mediasink/OutputStreamManager.cpp
@@ -82,23 +82,16 @@ OutputStreamData::OutputStreamData(Outpu
       mInputStream(mDOMStream->GetInputStream()->AsProcessedStream()),
       mPort(mInputStream->AllocateInputPort(mManager->mSourceStream)) {
   MOZ_ASSERT(NS_IsMainThread());
 }
 
 OutputStreamData::~OutputStreamData() {
   MOZ_ASSERT(NS_IsMainThread());
 
-  // During cycle collection, MediaStream can be destroyed and send
-  // its Destroy message before this decoder is destroyed. So we have to
-  // be careful not to send any messages after the Destroy().
-  if (mInputStream->IsDestroyed()) {
-    return;
-  }
-
   // Disconnect any existing port.
   if (mPort) {
     mPort->Destroy();
   }
 }
 
 void OutputStreamData::AddTrack(TrackID aTrackID, MediaSegment::Type aType,
                                 nsIPrincipal* aPrincipal, CORSMode aCORSMode,