Bug 1565374 - Reset state. r=jib, a=RyanVM
authorJan-Ivar Bruaroey <jib@mozilla.com>
Wed, 24 Jul 2019 20:23:23 -0400
changeset 544719 162ad0aaccf9bd329d189184577e18fea1101911
parent 544718 fcb210ff98cd31ca8775ba1757117b58ba567563
child 544720 58fc6628c2cb331ac99879b2426e712f021c9142
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib, RyanVM
bugs1565374
milestone69.0
Bug 1565374 - Reset state. r=jib, a=RyanVM
dom/media/MediaManager.cpp
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -2286,16 +2286,17 @@ static void ReduceConstraint(
   // It looks like {audio: true}, do nothing.
   if (!aConstraint.IsMediaTrackConstraints()) {
     return;
   }
 
   // Keep mediaSource, ignore all other constraints.
   auto& c = aConstraint.GetAsMediaTrackConstraints();
   nsString mediaSource = c.mMediaSource;
+  aConstraint.Uninit();
   aConstraint.SetAsMediaTrackConstraints().mMediaSource = mediaSource;
 }
 
 /**
  * The entry point for this file. A call from Navigator::mozGetUserMedia
  * will end up here. MediaManager is a singleton that is responsible
  * for handling all incoming getUserMedia calls from every window.
  */