Bug 1294605 - Media element captureStream() streams shouldn't keep devices alive. r=jib draft
authorAndreas Pehrson <pehrsons@gmail.com>
Mon, 29 Aug 2016 16:27:11 +0200
changeset 428041 fccfba3526977003636457fea7748d9bcadf1790
parent 428040 5c3498938bf7f62e61f811b6fc8581c8e0ed3f42
child 428042 35b07a9b31e1bf80773e582566ce359d5a910aee
push id33215
push userbmo:pehrson@telenordigital.com
push dateFri, 21 Oct 2016 13:47:09 +0000
reviewersjib
bugs1294605
milestone52.0a1
Bug 1294605 - Media element captureStream() streams shouldn't keep devices alive. r=jib MozReview-Commit-ID: 3tSFbygTZs1
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -2205,25 +2205,21 @@ public:
                                            MediaStreamTrackSource)
 
   explicit StreamCaptureTrackSource(MediaStreamTrackSource* aCapturedTrackSource)
     : MediaStreamTrackSource(aCapturedTrackSource->GetPrincipal(),
                              true,
                              nsString())
     , mCapturedTrackSource(aCapturedTrackSource)
   {
-    mCapturedTrackSource->RegisterSink(this);
   }
 
   void Destroy() override
   {
     MOZ_ASSERT(mCapturedTrackSource);
-    if (mCapturedTrackSource) {
-      mCapturedTrackSource->UnregisterSink(this);
-    }
   }
 
   MediaSourceEnum GetMediaSource() const override
   {
     return MediaSourceEnum::Other;
   }
 
   CORSMode GetCORSMode() const override