Bug 1398659. P11 - replace mCacheStream.GetLength() with GetLength(). draft
authorJW Wang <jwwang@mozilla.com>
Fri, 08 Sep 2017 14:38:22 +0800
changeset 662187 cac920ecb1f90d2249d79db7268861fa745ab933
parent 662186 03902552ea91927aba65f1c9ac9f2a18097f45ba
child 662188 e535e8d25f2af6d9deea316c74721984371fd56f
push id78979
push userjwwang@mozilla.com
push dateMon, 11 Sep 2017 05:57:05 +0000
bugs1398659
milestone57.0a1
Bug 1398659. P11 - replace mCacheStream.GetLength() with GetLength(). MozReview-Commit-ID: BGgObe2XG5C
dom/media/MediaResource.cpp
--- a/dom/media/MediaResource.cpp
+++ b/dom/media/MediaResource.cpp
@@ -743,17 +743,17 @@ void ChannelMediaResource::Resume()
     if (mChannel) {
       // Just wake up our existing channel
       mChannelStatistics.Start();
       // if an error occurs after Resume, assume it's because the server
       // timed out the connection and we should reopen it.
       mReopenOnError = true;
       element->DownloadResumed();
     } else {
-      int64_t totalLength = mCacheStream.GetLength();
+      int64_t totalLength = GetLength();
       // If mOffset is at the end of the stream, then we shouldn't try to
       // seek to it. The seek will fail and be wasted anyway. We can leave
       // the channel dead; if the media cache wants to read some other data
       // in the future, it will call CacheClientSeek itself which will reopen the
       // channel.
       if (totalLength < 0 || mOffset < totalLength) {
         // There is (or may be) data to read at mOffset, so start reading it.
         // Need to recreate the channel.