Bug 1407354 - Remove EncoderErrorNotifierRunnable from MediaRecorder Session as it's no longer used. r?pehrsons
MozReview-Commit-ID: 9Ehp6JWIt8t
--- a/dom/media/MediaRecorder.cpp
+++ b/dom/media/MediaRecorder.cpp
@@ -285,43 +285,16 @@ class MediaRecorder::Session: public Pri
mBuffer[i].Length());
}
}
return NS_OK;
}
};
- // Notify encoder error, run in main thread task. (Bug 1095381)
- class EncoderErrorNotifierRunnable : public Runnable
- {
- public:
- explicit EncoderErrorNotifierRunnable(Session* aSession)
- : Runnable("dom::MediaRecorder::Session::EncoderErrorNotifierRunnable")
- , mSession(aSession)
- { }
-
- NS_IMETHOD Run() override
- {
- LOG(LogLevel::Debug, ("Session.ErrorNotifyRunnable s=(%p)", mSession.get()));
- MOZ_ASSERT(NS_IsMainThread());
-
- RefPtr<MediaRecorder> recorder = mSession->mRecorder;
- if (!recorder) {
- return NS_OK;
- }
-
- recorder->NotifyError(NS_ERROR_UNEXPECTED);
- return NS_OK;
- }
-
- private:
- RefPtr<Session> mSession;
- };
-
// Fire start event and set mimeType, run in main thread task.
class DispatchStartEventRunnable : public Runnable
{
public:
DispatchStartEventRunnable(Session* aSession, const nsAString& aEventName)
: Runnable("dom::MediaRecorder::Session::DispatchStartEventRunnable")
, mSession(aSession)
, mEventName(aEventName)
@@ -407,17 +380,16 @@ class MediaRecorder::Session: public Pri
}
}
protected:
RefPtr<TaskQueue> mEncoderThread;
RefPtr<Session> mSession;
};
- friend class EncoderErrorNotifierRunnable;
friend class PushBlobRunnable;
friend class TracksAvailableCallback;
public:
Session(MediaRecorder* aRecorder, int32_t aTimeSlice)
: mRecorder(aRecorder)
, mTimeSlice(aTimeSlice)
, mStopIssued(false)