Bug 1407354 - Remove EncoderErrorNotifierRunnable from MediaRecorder Session as it's no longer used. r?pehrsons draft
authorBryce Van Dyk <bvandyk@mozilla.com>
Tue, 10 Oct 2017 15:53:06 +1300
changeset 681122 a710be862405eda7d98825c83c983cbeb4d2b2e6
parent 681121 4cf84e8027ce6564e5837555542ed6ad9ba9d45d
child 681123 a4216dbb34bf9a3830979bc441d685579a3b3a9b
push id84766
push userbvandyk@mozilla.com
push dateTue, 17 Oct 2017 01:14:58 +0000
reviewerspehrsons
bugs1407354
milestone58.0a1
Bug 1407354 - Remove EncoderErrorNotifierRunnable from MediaRecorder Session as it's no longer used. r?pehrsons MozReview-Commit-ID: 9Ehp6JWIt8t
dom/media/MediaRecorder.cpp
--- 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)