Bug 1265969 - Don't fire pop events in MediaQueue::Reset(). r=jya.
authorJW Wang <jwwang@mozilla.com>
Tue, 19 Apr 2016 23:04:02 +0800
changeset 331861 b14d94f953ee8d9d4ffa1166fafaaf751202ace5
parent 331857 34f5a7144be34c3f48ebfeb4cbe3bd38419c0c7c
child 331862 bc213dff20a3c30df7f6eab9eab1f2b7cc1dcbd2
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1265969
milestone48.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 1265969 - Don't fire pop events in MediaQueue::Reset(). r=jya. MozReview-Commit-ID: 6J0VsVvIeg
dom/media/MediaQueue.h
--- a/dom/media/MediaQueue.h
+++ b/dom/media/MediaQueue.h
@@ -74,17 +74,17 @@ public:
   inline T* PeekFront() {
     ReentrantMonitorAutoEnter mon(mReentrantMonitor);
     return static_cast<T*>(nsDeque::PeekFront());
   }
 
   void Reset() {
     ReentrantMonitorAutoEnter mon(mReentrantMonitor);
     while (GetSize() > 0) {
-      RefPtr<T> x = PopFront();
+      RefPtr<T> x = dont_AddRef(static_cast<T*>(nsDeque::PopFront()));
     }
     mEndOfStream = false;
   }
 
   bool AtEndOfStream() {
     ReentrantMonitorAutoEnter mon(mReentrantMonitor);
     return GetSize() == 0 && mEndOfStream;
   }