Bug 1317576. Part 3 - remove unused parameter/member. r=cpearce
authorJW Wang <jwwang@mozilla.com>
Mon, 14 Nov 2016 16:47:07 +0800
changeset 439699 8f2dc4f621b57ccf0651b0a5b7db2f11d96685d8
parent 439698 aafde76b36ae23a0f3772b7743c6d8577621f3a2
child 439700 efdc26b14ffa13ea55f3674bb1ba9540b70daf1f
push id36064
push userrthijssen@mozilla.com
push dateWed, 16 Nov 2016 13:38:27 +0000
reviewerscpearce
bugs1317576
milestone53.0a1
Bug 1317576. Part 3 - remove unused parameter/member. r=cpearce MozReview-Commit-ID: Ff6a8MKVY8q
dom/media/MediaDecoder.cpp
dom/media/MediaDecoder.h
dom/media/MediaDecoderStateMachine.cpp
dom/media/SeekJob.cpp
dom/media/SeekJob.h
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -1126,36 +1126,28 @@ MediaDecoder::NotifyBytesConsumed(int64_
 
 void
 MediaDecoder::OnSeekResolved(SeekResolveValue aVal)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(!IsShutdown());
   mSeekRequest.Complete();
 
-  bool fireEnded = false;
   {
     // An additional seek was requested while the current seek was
     // in operation.
     UnpinForSeek();
-    fireEnded = aVal.mAtEnd;
-    if (aVal.mAtEnd) {
-      ChangeState(PLAY_STATE_ENDED);
-    }
     mLogicallySeeking = false;
   }
 
   // Ensure logical position is updated after seek.
   UpdateLogicalPositionInternal();
 
   mOwner->SeekCompleted();
   AsyncResolveSeekDOMPromiseIfExists();
-  if (fireEnded) {
-    mOwner->PlaybackEnded();
-  }
 }
 
 void
 MediaDecoder::OnSeekRejected()
 {
   MOZ_ASSERT(NS_IsMainThread());
   mSeekRequest.Complete();
   mLogicallySeeking = false;
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -54,17 +54,16 @@ enum class MediaEventType : int8_t;
 #ifdef GetCurrentTime
 #undef GetCurrentTime
 #endif
 
 class MediaDecoder : public AbstractMediaDecoder
 {
 public:
   struct SeekResolveValue {
-    bool mAtEnd;
   };
 
   // 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;
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -1506,17 +1506,17 @@ SeekingState::SeekCompleted()
     // this when playing a live stream, since the end of media will advance
     // once we download more data!
     AudioQueue().Finish();
     VideoQueue().Finish();
   }
 
   // We want to resolve the seek request prior finishing the first frame
   // to ensure that the seeked event is fired prior loadeded.
-  mSeekJob.Resolve(false, __func__);
+  mSeekJob.Resolve(__func__);
 
   // Notify FirstFrameLoaded now if we haven't since we've decoded some data
   // for readyState to transition to HAVE_CURRENT_DATA and fire 'loadeddata'.
   if (!mMaster->mSentFirstFrameLoadedEvent) {
     // Only MSE can start seeking before finishing decoding first frames.
     MOZ_ASSERT(Reader()->ForceZeroStartTime());
     mMaster->FinishDecodeFirstFrame();
   }
--- a/dom/media/SeekJob.cpp
+++ b/dom/media/SeekJob.cpp
@@ -34,20 +34,19 @@ SeekJob& SeekJob::operator=(SeekJob&& aO
 }
 
 bool SeekJob::Exists() const
 {
   MOZ_ASSERT(mTarget.IsValid() == !mPromise.IsEmpty());
   return mTarget.IsValid();
 }
 
-void SeekJob::Resolve(bool aAtEnd, const char* aCallSite)
+void SeekJob::Resolve(const char* aCallSite)
 {
   MediaDecoder::SeekResolveValue val;
-  val.mAtEnd = aAtEnd;
   mPromise.Resolve(val, aCallSite);
   mTarget.Reset();
 }
 
 void SeekJob::RejectIfExists(const char* aCallSite)
 {
   mTarget.Reset();
   mPromise.RejectIfExists(true, aCallSite);
--- a/dom/media/SeekJob.h
+++ b/dom/media/SeekJob.h
@@ -18,17 +18,17 @@ struct SeekJob {
   SeekJob();
 
   SeekJob(SeekJob&& aOther);
 
   SeekJob& operator=(SeekJob&& aOther);
 
   bool Exists() const;
 
-  void Resolve(bool aAtEnd, const char* aCallSite);
+  void Resolve(const char* aCallSite);
 
   void RejectIfExists(const char* aCallSite);
 
   ~SeekJob();
 
   SeekTarget mTarget;
   MozPromiseHolder<MediaDecoder::SeekPromise> mPromise;
 };