Bug 1398659. P12 - remove unused MediaCacheStream::mHasHadUpdate. r=gerald
authorJW Wang <jwwang@mozilla.com>
Fri, 08 Sep 2017 15:46:53 +0800
changeset 429495 130a5e787ba62b044dcc1150a2146286de9128ed
parent 429494 fadb12f8f604e32db23b5e49beb1b55160a66c1a
child 429496 42306e3867ae163689a28dc70bb1ca8b154fbce3
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1398659
milestone57.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 1398659. P12 - remove unused MediaCacheStream::mHasHadUpdate. r=gerald MozReview-Commit-ID: 98Nhi924Jip
dom/media/MediaCache.cpp
dom/media/MediaCache.h
--- a/dom/media/MediaCache.cpp
+++ b/dom/media/MediaCache.cpp
@@ -445,17 +445,16 @@ MediaCacheFlusher::Observe(nsISupports *
   }
   return NS_OK;
 }
 
 MediaCacheStream::MediaCacheStream(ChannelMediaResource* aClient,
                                    bool aIsPrivateBrowsing)
   : mMediaCache(nullptr)
   , mClient(aClient)
-  , mHasHadUpdate(false)
   , mClosed(false)
   , mDidNotifyDataEnded(false)
   , mResourceID(0)
   , mIsTransportSeekable(false)
   , mCacheSuspended(false)
   , mChannelEnded(false)
   , mChannelOffset(0)
   , mStreamLength(-1)
@@ -1421,17 +1420,16 @@ MediaCache::Update()
       stream->mCacheSuspended = false;
       break;
     case SUSPEND:
       stream->mCacheSuspended = true;
       break;
     default:
       break;
     }
-    stream->mHasHadUpdate = true;
   }
 
   for (uint32_t i = 0; i < mStreams.Length(); ++i) {
     MediaCacheStream* stream = mStreams[i];
     nsresult rv;
     switch (actions[i]) {
     case SEEK:
 	case SEEK_AND_RESUME:
--- a/dom/media/MediaCache.h
+++ b/dom/media/MediaCache.h
@@ -429,19 +429,16 @@ private:
   bool UpdatePrincipal(nsIPrincipal* aPrincipal);
 
   // Instance of MediaCache to use with this MediaCacheStream.
   RefPtr<MediaCache> mMediaCache;
 
   // These fields are main-thread-only.
   ChannelMediaResource*  mClient;
   nsCOMPtr<nsIPrincipal> mPrincipal;
-  // Set to true when MediaCache::Update() has finished while this stream
-  // was present.
-  bool                   mHasHadUpdate;
   // Set to true when the stream has been closed either explicitly or
   // due to an internal cache error
   bool                   mClosed;
   // True if CacheClientNotifyDataEnded has been called for this stream.
   bool                   mDidNotifyDataEnded;
 
   // The following fields must be written holding the cache's monitor and
   // only on the main thread, thus can be read either on the main thread