Bug 1317576. Part 4 - remove unused MediaDecoder::SeekResolveValue. r=cpearce
authorJW Wang <jwwang@mozilla.com>
Mon, 14 Nov 2016 17:00:53 +0800
changeset 322643 efdc26b14ffa13ea55f3674bb1ba9540b70daf1f
parent 322642 8f2dc4f621b57ccf0651b0a5b7db2f11d96685d8
child 322644 16b9dfb4ca47b34e41e300b59fc1804a4b20abcc
push id34288
push userjwwang@mozilla.com
push dateWed, 16 Nov 2016 06:11:55 +0000
treeherderautoland@1f9d289e8272 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1317576
milestone53.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 1317576. Part 4 - remove unused MediaDecoder::SeekResolveValue. r=cpearce MozReview-Commit-ID: 9H6e0gFvWeT
dom/media/MediaDecoder.cpp
dom/media/MediaDecoder.h
dom/media/SeekJob.cpp
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -1120,17 +1120,17 @@ MediaDecoder::NotifyBytesConsumed(int64_
   MOZ_ASSERT(mDecoderStateMachine);
   if (aOffset >= mDecoderPosition) {
     mPlaybackStatistics->AddBytes(aBytes);
   }
   mDecoderPosition = aOffset + aBytes;
 }
 
 void
-MediaDecoder::OnSeekResolved(SeekResolveValue aVal)
+MediaDecoder::OnSeekResolved()
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(!IsShutdown());
   mSeekRequest.Complete();
 
   {
     // An additional seek was requested while the current seek was
     // in operation.
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -53,19 +53,16 @@ enum class MediaEventType : int8_t;
 // GetTickCount() and conflicts with MediaDecoder::GetCurrentTime implementation.
 #ifdef GetCurrentTime
 #undef GetCurrentTime
 #endif
 
 class MediaDecoder : public AbstractMediaDecoder
 {
 public:
-  struct SeekResolveValue {
-  };
-
   // Used to register with MediaResource to receive notifications which will
   // be forwarded to MediaDecoder.
   class ResourceCallback : public MediaResourceCallback {
     // Throttle calls to MediaDecoder::NotifyDataArrived()
     // to be at most once per 500ms.
     static const uint32_t sDelay = 500;
 
   public:
@@ -90,17 +87,17 @@ public:
     static void TimerCallback(nsITimer* aTimer, void* aClosure);
 
     // The decoder to send notifications. Main-thread only.
     MediaDecoder* mDecoder = nullptr;
     nsCOMPtr<nsITimer> mTimer;
     bool mTimerArmed = false;
   };
 
-  typedef MozPromise<SeekResolveValue, bool /* aIgnored */, /* IsExclusive = */ true> SeekPromise;
+  typedef MozPromise<bool /* aIgnored */, bool /* aIgnored */, /* IsExclusive = */ true> SeekPromise;
 
   NS_DECL_THREADSAFE_ISUPPORTS
 
   // Enumeration for the valid play states (see mPlayState)
   enum PlayState {
     PLAY_STATE_START,
     PLAY_STATE_LOADING,
     PLAY_STATE_PAUSED,
@@ -380,17 +377,17 @@ private:
   // the track list. Call on the main thread only.
   void RemoveMediaTracks();
 
   // Called when the video has completed playing.
   // Call on the main thread only.
   void PlaybackEnded();
 
   void OnSeekRejected();
-  void OnSeekResolved(SeekResolveValue aVal);
+  void OnSeekResolved();
 
   void SeekingChanged()
   {
     // Stop updating the bytes downloaded for progress notifications when
     // seeking to prevent wild changes to the progress notification.
     MOZ_ASSERT(NS_IsMainThread());
     mIgnoreProgressData = mLogicallySeeking;
   }
--- a/dom/media/SeekJob.cpp
+++ b/dom/media/SeekJob.cpp
@@ -36,18 +36,17 @@ SeekJob& SeekJob::operator=(SeekJob&& aO
 bool SeekJob::Exists() const
 {
   MOZ_ASSERT(mTarget.IsValid() == !mPromise.IsEmpty());
   return mTarget.IsValid();
 }
 
 void SeekJob::Resolve(const char* aCallSite)
 {
-  MediaDecoder::SeekResolveValue val;
-  mPromise.Resolve(val, aCallSite);
+  mPromise.Resolve(true, aCallSite);
   mTarget.Reset();
 }
 
 void SeekJob::RejectIfExists(const char* aCallSite)
 {
   mTarget.Reset();
   mPromise.RejectIfExists(true, aCallSite);
 }