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 595151 d83836ad127895197fba32cd69d282fe9b1c27df
parent 595150 80df4e3bda168660812d420e26c6117c7ccc4b88
child 595152 08553aded67b2954d2ba369fbffc056f7f1497d8
push id64265
push usergsquelart@mozilla.com
push dateFri, 16 Jun 2017 03:37:56 +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
@@ -1641,32 +1641,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