Bug 1394724. P1 - assert the channel is already closed in ~ChannelMediaResource(). r=cpearce
authorJW Wang <jwwang@mozilla.com>
Tue, 29 Aug 2017 15:41:40 +0800
changeset 377825 a81e995c2a6a06447745f22f60fab62ca88f2eb5
parent 377824 04b6be50a2526c7a26a63715f441c47e1aa1f9be
child 377826 4e9acbce2e29df707cf58881581dc094e9d425b1
push id50044
push userjwwang@mozilla.com
push dateThu, 31 Aug 2017 03:05:23 +0000
treeherderautoland@87c1afc748cc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1394724
milestone57.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 1394724. P1 - assert the channel is already closed in ~ChannelMediaResource(). r=cpearce MozReview-Commit-ID: 4lJNEEBsv4r
dom/media/MediaResource.cpp
--- a/dom/media/MediaResource.cpp
+++ b/dom/media/MediaResource.cpp
@@ -104,20 +104,18 @@ ChannelMediaResource::ChannelMediaResour
   , mChannelStatistics(aStatistics)
   , mIgnoreResume(false)
   , mSuspendAgent(mChannel)
 {
 }
 
 ChannelMediaResource::~ChannelMediaResource()
 {
-  if (mListener) {
-    // Kill its reference to us since we're going away
-    mListener->Revoke();
-  }
+  MOZ_ASSERT(!mChannel);
+  MOZ_ASSERT(!mListener);
 }
 
 // ChannelMediaResource::Listener just observes the channel and
 // forwards notifications to the ChannelMediaResource. We use multiple
 // listener objects so that when we open a new stream for a seek we can
 // disconnect the old listener from the ChannelMediaResource and hook up
 // a new listener, so notifications from the old channel are discarded
 // and don't confuse us.