Bug 1394724. P1 - assert the channel is already closed in ~ChannelMediaResource(). draft
authorJW Wang <jwwang@mozilla.com>
Tue, 29 Aug 2017 15:41:40 +0800
changeset 655572 b2d670ce416e2ed72db290d31269de2483205262
parent 655571 c4e4ad59486f24c3bc46070c05a68ba0350f47af
child 655573 9e584dd5f01d3de647181bc84d34e8193949cb9b
child 656337 cb67004d0d50446104aa33819339693366d08c4c
push id76927
push userjwwang@mozilla.com
push dateWed, 30 Aug 2017 07:33:51 +0000
bugs1394724
milestone57.0a1
Bug 1394724. P1 - assert the channel is already closed in ~ChannelMediaResource(). 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.