Bug 1452993 - Get MSG instance from MediaStream to avoid the risk of creating new instance. r=padenot
authorAlex Chronopoulos <achronop@gmail.com>
Tue, 10 Apr 2018 18:06:32 +0300
changeset 413202 5bb64d5081d6d23d7f58f470922ba3069cb91a6a
parent 413201 bab10eeb6799a277b7237851293041cbec55a370
child 413203 fb2183d65cda80073e184d74e5c52fd773c4b835
push id33839
push userapavel@mozilla.com
push dateFri, 13 Apr 2018 21:55:48 +0000
treeherdermozilla-central@1b2faff1e6e0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1452993
milestone61.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 1452993 - Get MSG instance from MediaStream to avoid the risk of creating new instance. r=padenot MozReview-Commit-ID: F1R4FCEe1Gf
dom/media/MediaManager.cpp
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -4392,19 +4392,17 @@ SourceListener::StopSharing()
     StopTrack(kVideoTrack);
   }
   if (mAudioDeviceState &&
       mAudioDeviceState->mDevice->GetMediaSource() == MediaSourceEnum::AudioCapture) {
     uint64_t windowID = mWindowListener->WindowID();
     nsCOMPtr<nsPIDOMWindowInner> window = nsGlobalWindowInner::GetInnerWindowWithId(windowID)->AsInner();
     MOZ_RELEASE_ASSERT(window);
     window->SetAudioCapture(false);
-    MediaStreamGraph* graph =
-      MediaStreamGraph::GetInstance(MediaStreamGraph::AUDIO_THREAD_DRIVER, window,
-                                    MediaStreamGraph::REQUEST_DEFAULT_SAMPLE_RATE);
+    MediaStreamGraph* graph = mStream->Graph();
     graph->UnregisterCaptureStreamForWindow(windowID);
     mStream->Destroy();
   }
 }
 
 SourceMediaStream*
 SourceListener::GetSourceStream()
 {