Backed out changeset 1028b87b029e (bug 1294605)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 31 Aug 2016 22:55:51 +0200
changeset 312066 63390c8490fa24416bdf1f2821feb805e25913f7
parent 312065 e68e4ed5ab6e6692c90284443a3ad811aa35f183
child 312067 8169af8a92061ce43eed24da499aee0a4c41e024
push id81280
push userarchaeopteryx@coole-files.de
push dateWed, 31 Aug 2016 20:57:57 +0000
treeherdermozilla-inbound@20bc490e8cac [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1294605
milestone51.0a1
backs out1028b87b029e276584a7ae6ab1d2c72dbcbf2daf
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
Backed out changeset 1028b87b029e (bug 1294605)
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -2226,21 +2226,25 @@ 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