Backed out changeset 8f0aa4187619 (bug 1458538) for idlharness.window.html failures CLOSED TREE
authorBogdan Tara <btara@mozilla.com>
Wed, 10 Oct 2018 03:54:42 +0300
changeset 496140 3854b434407792df13fad738667b042e2ebb0449
parent 496139 983a5ee19bb3844c4d7f00ba55bb958b01e7341c
child 496141 bf31de5be0dcd71f3257485c66db5627ec3ed205
child 496189 0be6d75ba4a31a6fb6321eb3dd08778b0f5a2612
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1458538
milestone64.0a1
backs out8f0aa41876197fc701ddadb73eee8edaa753af19
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
Backed out changeset 8f0aa4187619 (bug 1458538) for idlharness.window.html failures CLOSED TREE
dom/media/MediaRecorder.cpp
dom/media/MediaRecorder.h
dom/webidl/MediaRecorder.webidl
--- a/dom/media/MediaRecorder.cpp
+++ b/dom/media/MediaRecorder.cpp
@@ -1391,19 +1391,17 @@ MediaRecorder::Pause(ErrorResult& aResul
   }
 
   MOZ_ASSERT(mSessions.Length() > 0);
   nsresult rv = mSessions.LastElement()->Pause();
   if (NS_FAILED(rv)) {
     NotifyError(rv);
     return;
   }
-
   mState = RecordingState::Paused;
-  DispatchSimpleEvent(NS_LITERAL_STRING("pause"));
 }
 
 void
 MediaRecorder::Resume(ErrorResult& aResult)
 {
   LOG(LogLevel::Debug, ("MediaRecorder.Resume"));
   if (mState == RecordingState::Inactive) {
     aResult.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
@@ -1411,19 +1409,17 @@ MediaRecorder::Resume(ErrorResult& aResu
   }
 
   MOZ_ASSERT(mSessions.Length() > 0);
   nsresult rv = mSessions.LastElement()->Resume();
   if (NS_FAILED(rv)) {
     NotifyError(rv);
     return;
   }
-
   mState = RecordingState::Recording;
-  DispatchSimpleEvent(NS_LITERAL_STRING("resume"));
 }
 
 void
 MediaRecorder::RequestData(ErrorResult& aResult)
 {
   if (mState == RecordingState::Inactive) {
     aResult.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
     return;
--- a/dom/media/MediaRecorder.h
+++ b/dom/media/MediaRecorder.h
@@ -72,20 +72,20 @@ public:
   // Pause a recording.
   void Pause(ErrorResult& aResult);
   // Resume a paused recording.
   void Resume(ErrorResult& aResult);
   // Extract encoded data Blob from MutableBlobStorage.
   void RequestData(ErrorResult& aResult);
   // Return the The DOMMediaStream passed from UA.
   DOMMediaStream* Stream() const { return mDOMStream; }
+  // The current state of the MediaRecorder object.
+  RecordingState State() const { return mState; }
   // Return the current encoding MIME type selected by the MediaEncoder.
   void GetMimeType(nsString &aMimeType);
-  // The current state of the MediaRecorder object.
-  RecordingState State() const { return mState; }
 
   static bool IsTypeSupported(GlobalObject& aGlobal, const nsAString& aType);
   static bool IsTypeSupported(const nsAString& aType);
 
   // Construct a recorder with a DOM media stream object as its source.
   static already_AddRefed<MediaRecorder>
   Constructor(const GlobalObject& aGlobal,
               DOMMediaStream& aStream,
@@ -101,22 +101,20 @@ public:
 
   /*
    * Measure the size of the buffer, and heap memory in bytes occupied by
    * mAudioEncoder and mVideoEncoder.
    */
   typedef MozPromise<size_t, size_t, true> SizeOfPromise;
   RefPtr<SizeOfPromise> SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf);
   // EventHandler
+  IMPL_EVENT_HANDLER(dataavailable)
+  IMPL_EVENT_HANDLER(error)
   IMPL_EVENT_HANDLER(start)
   IMPL_EVENT_HANDLER(stop)
-  IMPL_EVENT_HANDLER(dataavailable)
-  IMPL_EVENT_HANDLER(pause)
-  IMPL_EVENT_HANDLER(resume)
-  IMPL_EVENT_HANDLER(error)
   IMPL_EVENT_HANDLER(warning)
 
   NS_DECL_NSIDOCUMENTACTIVITY
 
   uint32_t GetAudioBitrate() { return mAudioBitsPerSecond; }
   uint32_t GetVideoBitrate() { return mVideoBitsPerSecond; }
   uint32_t GetBitrate() { return mBitsPerSecond; }
 protected:
--- a/dom/webidl/MediaRecorder.webidl
+++ b/dom/webidl/MediaRecorder.webidl
@@ -14,32 +14,28 @@ enum RecordingState { "inactive", "recor
 
 [Constructor(MediaStream stream, optional MediaRecorderOptions options),
  Constructor(AudioNode node, optional unsigned long output = 0,
              optional MediaRecorderOptions options)]
 interface MediaRecorder : EventTarget {
 
   readonly attribute MediaStream stream;
 
+  readonly attribute RecordingState state;
+
   readonly attribute DOMString mimeType;
 
-  readonly attribute RecordingState state;
+  attribute EventHandler ondataavailable;
+
+  attribute EventHandler onerror;
 
   attribute EventHandler onstart;
 
   attribute EventHandler onstop;
 
-  attribute EventHandler ondataavailable;
-
-  attribute EventHandler onpause;
-
-  attribute EventHandler onresume;
-
-  attribute EventHandler onerror;
-
   attribute EventHandler onwarning;
 
   [Throws]
   void start(optional long timeSlice);
 
   [Throws]
   void stop();