Bug 1450607 - P3. Remove unused argument. r=gerald, a=RyanVM
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 24 May 2018 17:38:02 +0200
changeset 473505 ccf0bb5b140d41cc8f17d7bffe854d7ccee5a3b1
parent 473504 befed261c0ec350c1420b44f752ab603c757147e
child 473506 4fcab7ec6dd04b57b9b10ec367e35f7961fb10d2
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald, RyanVM
bugs1450607
milestone61.0
Bug 1450607 - P3. Remove unused argument. r=gerald, a=RyanVM MozReview-Commit-ID: 6NU9BLJi6kl
dom/media/ChannelMediaResource.cpp
dom/media/MediaCache.cpp
dom/media/MediaCache.h
--- a/dom/media/ChannelMediaResource.cpp
+++ b/dom/media/ChannelMediaResource.cpp
@@ -422,17 +422,17 @@ ChannelMediaResource::OnStopRequest(nsIR
       }
       // Close the streams that failed due to error. This will cause all
       // client Read and Seek operations on those streams to fail. Blocked
       // Reads will also be woken up.
       Close();
     }
   }
 
-  mCacheStream.NotifyDataEnded(mLoadID, aStatus, true /*aReopenOnError*/);
+  mCacheStream.NotifyDataEnded(mLoadID, aStatus);
   return NS_OK;
 }
 
 nsresult
 ChannelMediaResource::OnChannelRedirect(nsIChannel* aOld,
                                         nsIChannel* aNew,
                                         uint32_t aFlags,
                                         int64_t aOffset)
--- a/dom/media/MediaCache.cpp
+++ b/dom/media/MediaCache.cpp
@@ -2188,19 +2188,17 @@ MediaCacheStream::UpdateDownloadStatisti
   if (mChannelEnded || mClientSuspended) {
     mDownloadStatistics.Stop();
   } else {
     mDownloadStatistics.Start();
   }
 }
 
 void
-MediaCacheStream::NotifyDataEndedInternal(uint32_t aLoadID,
-                                          nsresult aStatus,
-                                          bool aReopenOnError)
+MediaCacheStream::NotifyDataEndedInternal(uint32_t aLoadID, nsresult aStatus)
 {
   MOZ_ASSERT(OwnerThread()->IsOnCurrentThread());
   AutoLock lock(mMediaCache->Monitor());
 
   if (mClosed || aLoadID != mLoadID) {
     // Nothing to do if the stream is closed or a new load has begun.
     return;
   }
@@ -2234,28 +2232,25 @@ MediaCacheStream::NotifyDataEndedInterna
       stream->mDidNotifyDataEnded = true;
       stream->mNotifyDataEndedStatus = aStatus;
       stream->mClient->CacheClientNotifyDataEnded(aStatus);
     }
   }
 }
 
 void
-MediaCacheStream::NotifyDataEnded(uint32_t aLoadID,
-                                  nsresult aStatus,
-                                  bool aReopenOnError)
+MediaCacheStream::NotifyDataEnded(uint32_t aLoadID, nsresult aStatus)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aLoadID > 0);
 
   RefPtr<ChannelMediaResource> client = mClient;
   nsCOMPtr<nsIRunnable> r = NS_NewRunnableFunction(
-    "MediaCacheStream::NotifyDataEnded",
-    [client, this, aLoadID, aStatus, aReopenOnError]() {
-      NotifyDataEndedInternal(aLoadID, aStatus, aReopenOnError);
+    "MediaCacheStream::NotifyDataEnded", [client, this, aLoadID, aStatus]() {
+      NotifyDataEndedInternal(aLoadID, aStatus);
     });
   OwnerThread()->Dispatch(r.forget());
 }
 
 void
 MediaCacheStream::NotifyClientSuspended(bool aSuspended)
 {
   MOZ_ASSERT(NS_IsMainThread());
--- a/dom/media/MediaCache.h
+++ b/dom/media/MediaCache.h
@@ -275,19 +275,17 @@ public:
                           const uint8_t* aData);
 
   // Set the load ID so the following NotifyDataEnded() call can work properly.
   // Used in some rare cases where NotifyDataEnded() is called without the
   // preceding NotifyDataStarted().
   void NotifyLoadID(uint32_t aLoadID);
 
   // Notifies the cache that the channel has closed with the given status.
-  void NotifyDataEnded(uint32_t aLoadID,
-                       nsresult aStatus,
-                       bool aReopenOnError = false);
+  void NotifyDataEnded(uint32_t aLoadID, nsresult aStatus);
 
   // Notifies the stream that the suspend status of the client has changed.
   // Main thread only.
   void NotifyClientSuspended(bool aSuspended);
 
   // Notifies the stream to resume download at the current offset.
   void NotifyResume();
 
@@ -463,19 +461,17 @@ private:
   // waiting on the media cache monitor. Called on the main thread only.
   void FlushPartialBlockInternal(AutoLock&, bool aNotify);
 
   void NotifyDataStartedInternal(uint32_t aLoadID,
                                  int64_t aOffset,
                                  bool aSeekable,
                                  int64_t aLength);
 
-  void NotifyDataEndedInternal(uint32_t aLoadID,
-                               nsresult aStatus,
-                               bool aReopenOnError);
+  void NotifyDataEndedInternal(uint32_t aLoadID, nsresult aStatus);
 
   void UpdateDownloadStatistics(AutoLock&);
 
   void CloseInternal(AutoLock&);
   void InitAsCloneInternal(MediaCacheStream* aOriginal);
 
   // Instance of MediaCache to use with this MediaCacheStream.
   RefPtr<MediaCache> mMediaCache;