Bug 1450607 - P1. Fix constness. r=gerald, a=RyanVM
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 23 May 2018 21:27:31 +0200
changeset 473503 83e5c99c142fe675abc35b6a5118f84161f50331
parent 473502 5e583b4b75c6c5c9e3ada88505d0eb1cdc874022
child 473504 befed261c0ec350c1420b44f752ab603c757147e
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald, RyanVM
Bug 1450607 - P1. Fix constness. r=gerald, a=RyanVM MozReview-Commit-ID: CeftB0qmzTf
--- a/dom/media/MediaCache.cpp
+++ b/dom/media/MediaCache.cpp
@@ -2440,17 +2440,17 @@ MediaCacheStream::Unpin()
   NS_ASSERTION(mPinCount > 0, "Unbalanced Unpin");
   // Queue an Update since we may be able to read more into the
   // cache, if this stream's block have become evictable
+MediaCacheStream::GetLength() const
   AutoLock lock(mMediaCache->Monitor());
   return mStreamLength;
 MediaCacheStream::GetNextCachedData(int64_t aOffset)
--- a/dom/media/MediaCache.h
+++ b/dom/media/MediaCache.h
@@ -297,17 +297,17 @@ public:
   void Pin();
   void Unpin();
   // See comments above for NotifyDataStarted about how the length
   // can vary over time. Returns -1 if no length is known. Returns the
   // reported length if we haven't got any better information. If
   // the stream ended normally we return the length we actually got.
   // If we've successfully read data beyond the originally reported length,
   // we return the end of the data we've read.
-  int64_t GetLength();
+  int64_t GetLength() const;
   // Returns the unique resource ID. Call only on the main thread or while
   // holding the media cache lock.
   int64_t GetResourceID() { return mResourceID; }
   // Returns the end of the bytes starting at the given offset
   // which are in cache.
   int64_t GetCachedDataEnd(int64_t aOffset);
   // Returns the offset of the first byte of cached data at or after aOffset,
   // or -1 if there is no such cached data.