Bug 1373589 - Remove MediaResourceCallback::NotifyDecodeError which has no callers at all.
MozReview-Commit-ID: D2xqWHIiRBv
--- 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