Bug 1625372 remove unnecessary DestroyNonRealtimeInstance() call from AudioDestinationNode::DestroyMediaTrack() r=padenot
authorKarl Tomlinson <karlt+@karlt.net>
Wed, 13 May 2020 10:13:19 +0000
changeset 530240 9488c1c33caf6eaca7fc5f4680750e748418a058
parent 530239 152617fc95a03a5a4b835b56ed0b70d49404d9e9
child 530241 8c9fb10d84edc87a28eb4ea6fbec64e9c56cb2be
push id37420
push usernerli@mozilla.com
push dateFri, 15 May 2020 21:52:36 +0000
treeherdermozilla-central@f340bbb582d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1625372
milestone78.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 1625372 remove unnecessary DestroyNonRealtimeInstance() call from AudioDestinationNode::DestroyMediaTrack() r=padenot DestroyMediaTrack() is called only on Unlink or destruction of the AudioDestinationNode. If there are no references to the AudioDestinationNode, then the graph's last stream will be destroyed and the graph will shut down itself. Differential Revision: https://phabricator.services.mozilla.com/D74812
dom/media/webaudio/AudioDestinationNode.cpp
--- a/dom/media/webaudio/AudioDestinationNode.cpp
+++ b/dom/media/webaudio/AudioDestinationNode.cpp
@@ -409,20 +409,16 @@ void AudioDestinationNode::DestroyMediaT
 
   if (!mTrack) {
     return;
   }
 
   Context()->ShutdownWorklet();
 
   mTrack->RemoveMainThreadListener(this);
-  MediaTrackGraph* graph = mTrack->Graph();
-  if (graph->IsNonRealtime()) {
-    MediaTrackGraph::DestroyNonRealtimeInstance(graph);
-  }
   AudioNode::DestroyMediaTrack();
 }
 
 void AudioDestinationNode::NotifyMainThreadTrackEnded() {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(mTrack->IsEnded());
 
   if (mIsOffline && GetAbstractMainThread()) {