Bug 1368837 - Document that MediaResource::GetCachedDataEnd should return aOffset when out of cache - r=cpearce
authorGerald Squelart <gsquelart@mozilla.com>
Thu, 01 Jun 2017 11:29:49 +1200
changeset 361715 7a404b72b9b8f89046938755e17c17de333dfdf5
parent 361714 d2e141768c617d8e45c89d1f55e1f5659fefc5e3
child 361716 e38d5530bf2b18ee63a7b3a1f7633376a0ce0969
push id31939
push usercbook@mozilla.com
push dateThu, 01 Jun 2017 11:49:28 +0000
treeherdermozilla-central@d96110d76619 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1368837
milestone55.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 1368837 - Document that MediaResource::GetCachedDataEnd should return aOffset when out of cache - r=cpearce MozReview-Commit-ID: JKeuEAjIRxr
dom/media/MediaResource.h
--- a/dom/media/MediaResource.h
+++ b/dom/media/MediaResource.h
@@ -285,18 +285,18 @@ public:
   // server may give us a resource of a different length to what it had
   // reported previously --- or it may just lie in its Content-Length
   // header and give us more or less data than it reported. We will adjust
   // the result of GetLength to reflect the data that's actually arriving.
   virtual int64_t GetLength() = 0;
   // Returns the offset of the first byte of cached data at or after aOffset,
   // or -1 if there is no such cached data.
   virtual int64_t GetNextCachedData(int64_t aOffset) = 0;
-  // Returns the end of the bytes starting at the given offset
-  // which are in cache.
+  // Returns the end of the bytes starting at the given offset which are in
+  // cache. Returns aOffset itself if there are zero bytes available there.
   virtual int64_t GetCachedDataEnd(int64_t aOffset) = 0;
   // Returns true if all the data from aOffset to the end of the stream
   // is in cache. If the end of the stream is not known, we return false.
   virtual bool IsDataCachedToEndOfResource(int64_t aOffset) = 0;
   // Returns true if we are expecting any more data to arrive
   // sometime in the not-too-distant future, either from the network or from
   // an appendBuffer call on a MediaSource element.
   virtual bool IsExpectingMoreData()