Bug 1373589 - Remove MediaResourceCallback::NotifyDecodeError which has no callers at all. r=kaku
authorJW Wang <jwwang@mozilla.com>
Fri, 16 Jun 2017 17:36:30 +0800
changeset 364585 d7ee40333fc1eb6cfe76ac006e171e484929ec8c
parent 364584 89d2cb80a186aeca6a9a08fcf0cbd403a55be88d
child 364586 b7f1511115e94267082114aaccfa47343cb15305
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)
reviewerskaku
bugs1373589
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 1373589 - Remove MediaResourceCallback::NotifyDecodeError which has no callers at all. r=kaku MozReview-Commit-ID: D2xqWHIiRBv
dom/media/MediaDecoder.cpp
dom/media/MediaDecoder.h
dom/media/MediaResourceCallback.h
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -181,28 +181,16 @@ void
 MediaDecoder::ResourceCallback::NotifyNetworkError()
 {
   MOZ_ASSERT(NS_IsMainThread());
   if (mDecoder) {
     mDecoder->NetworkError();
   }
 }
 
-void
-MediaDecoder::ResourceCallback::NotifyDecodeError()
-{
-  RefPtr<ResourceCallback> self = this;
-  nsCOMPtr<nsIRunnable> r = NS_NewRunnableFunction([=] () {
-    if (self->mDecoder) {
-      self->mDecoder->DecodeError(NS_ERROR_DOM_MEDIA_FATAL_ERR);
-    }
-  });
-  mAbstractMainThread->Dispatch(r.forget());
-}
-
 /* static */ void
 MediaDecoder::ResourceCallback::TimerCallback(nsITimer* aTimer, void* aClosure)
 {
   MOZ_ASSERT(NS_IsMainThread());
   ResourceCallback* thiz = static_cast<ResourceCallback*>(aClosure);
   MOZ_ASSERT(thiz->mDecoder);
   thiz->mDecoder->NotifyDataArrived();
   thiz->mTimerArmed = false;
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -106,17 +106,16 @@ public:
     // Called upon shutdown to stop receiving notifications.
     void Disconnect();
 
   private:
     /* MediaResourceCallback functions */
     MediaDecoderOwner* GetMediaOwner() const override;
     void SetInfinite(bool aInfinite) override;
     void NotifyNetworkError() override;
-    void NotifyDecodeError() override;
     void NotifyDataArrived() override;
     void NotifyBytesDownloaded() override;
     void NotifyDataEnded(nsresult aStatus) override;
     void NotifyPrincipalChanged() override;
     void NotifySuspendedStatusChanged() override;
     void NotifyBytesConsumed(int64_t aBytes, int64_t aOffset) override;
 
     static void TimerCallback(nsITimer* aTimer, void* aClosure);
--- a/dom/media/MediaResourceCallback.h
+++ b/dom/media/MediaResourceCallback.h
@@ -32,19 +32,16 @@ public:
   virtual MediaDecoderOwner* GetMediaOwner() const { return nullptr; }
 
   // Notify is duration is known to this MediaResource.
   virtual void SetInfinite(bool aInfinite) {}
 
   // Notify that a network error is encountered.
   virtual void NotifyNetworkError() {}
 
-  // Notify that decoding has failed.
-  virtual void NotifyDecodeError() {}
-
   // Notify that data arrives on the stream and is read into the cache.
   virtual void NotifyDataArrived() {}
 
   // Notify that MediaResource has received some data.
   virtual void NotifyBytesDownloaded() {}
 
   // Notify download is ended.
   // NOTE: this can be called with the media cache lock held, so don't