Bug 1373577. P3 - fix the comment since MediaResource::ReatAt() does update the offset of MediaResource. r=jya
authorJW Wang <jwwang@mozilla.com>
Thu, 15 Jun 2017 17:39:19 +0800
changeset 364583 c8d764a48d58cf9dde6fd2c6f8775872906bffb7
parent 364582 5f983c055532daa35bffc6347661427e407eb4fd
child 364584 89d2cb80a186aeca6a9a08fcf0cbd403a55be88d
push id32049
push usercbook@mozilla.com
push dateMon, 19 Jun 2017 11:36:23 +0000
treeherdermozilla-central@26d62a1ac0e3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1373577
milestone56.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 1373577. P3 - fix the comment since MediaResource::ReatAt() does update the offset of MediaResource. r=jya MozReview-Commit-ID: AV2UhhBKNxJ
dom/media/MediaResource.h
--- a/dom/media/MediaResource.h
+++ b/dom/media/MediaResource.h
@@ -787,25 +787,21 @@ public:
 
   // Same as ReadAt, but doesn't try to cache around the read.
   // Useful if you know that you will not read again from the same area.
   nsresult UncachedReadAt(int64_t aOffset,
                           char* aBuffer,
                           uint32_t aCount,
                           uint32_t* aBytes) const;
 
-  // Convenience methods, directly calling the MediaResource method of the same
-  // name.
-  // Those functions do not update the MediaResource offset as returned
-  // by Tell().
-
   // This method returns nullptr if anything fails.
   // Otherwise, it returns an owned buffer.
   // MediaReadAt may return fewer bytes than requested if end of stream is
   // encountered. There is no need to call it again to get more data.
+  // Note this method will not update mOffset.
   already_AddRefed<MediaByteBuffer> MediaReadAt(int64_t aOffset, uint32_t aCount) const
   {
     RefPtr<MediaByteBuffer> bytes = new MediaByteBuffer();
     bool ok = bytes->SetLength(aCount, fallible);
     NS_ENSURE_TRUE(ok, nullptr);
     char* curr = reinterpret_cast<char*>(bytes->Elements());
     const char* start = curr;
     while (aCount > 0) {