Bug 1368837 - Document that MediaResource::GetCachedDataEnd should return aOffset when out of cache - r?cpearce draft
authorGerald Squelart <gsquelart@mozilla.com>
Thu, 01 Jun 2017 11:29:49 +1200
changeset 587476 2710488da42c555756f97aa1c9f542508d45bcf2
parent 587471 edffa38ec0c515198f360f23d286290cb5081996
child 587477 501905bf2428e4ccd998ef23ac37ef5860c46bcb
push id61722
push usergsquelart@mozilla.com
push dateThu, 01 Jun 2017 04:10:47 +0000
reviewerscpearce
bugs1368837
milestone55.0a1
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()