Bug 1371882 - Removed unnecessary `gMediaCache->` from MediaCache member functions - r?cpearce draft
authorGerald Squelart <gsquelart@mozilla.com>
Thu, 08 Jun 2017 16:20:37 +1200
changeset 593025 f6b8a2b1e245edf5c60641ca919e6b0cebde66dc
parent 593024 a275e44391cb01245e5dcbbd4a76ee6d41ae63bb
child 593026 2b5f8fd564b585d8910e31e9ae01ee80b8eec820
push id63579
push usergsquelart@mozilla.com
push dateTue, 13 Jun 2017 05:16:04 +0000
reviewerscpearce
bugs1371882
milestone56.0a1
Bug 1371882 - Removed unnecessary `gMediaCache->` from MediaCache member functions - r?cpearce MozReview-Commit-ID: BKjH9hfoL5g
dom/media/MediaCache.cpp
--- a/dom/media/MediaCache.cpp
+++ b/dom/media/MediaCache.cpp
@@ -1631,32 +1631,32 @@ MediaCache::OpenStream(MediaCacheStream*
   NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
 
   ReentrantMonitorAutoEnter mon(mReentrantMonitor);
   LOG("Stream %p opened", aStream);
   mStreams.AppendElement(aStream);
   aStream->mResourceID = AllocateResourceID();
 
   // Queue an update since a new stream has been opened.
-  gMediaCache->QueueUpdate();
+  QueueUpdate();
 }
 
 void
 MediaCache::ReleaseStream(MediaCacheStream* aStream)
 {
   NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
 
   ReentrantMonitorAutoEnter mon(mReentrantMonitor);
   LOG("Stream %p closed", aStream);
   mStreams.RemoveElement(aStream);
 
   // Update MediaCache again for |mStreams| is changed.
   // We need to re-run Update() to ensure streams reading from the same resource
   // as the removed stream get a chance to continue reading.
-  gMediaCache->QueueUpdate();
+  QueueUpdate();
 }
 
 void
 MediaCache::ReleaseStreamBlocks(MediaCacheStream* aStream)
 {
   mReentrantMonitor.AssertCurrentThreadIn();
 
   // XXX scanning the entire stream doesn't seem great, if not much of it