Bug 1499903 - part3 : change 'mLogicallySeeking' to Watchable r=chunmin
authoralwu <alwu@mozilla.com>
Fri, 23 Nov 2018 05:07:45 +0000
changeset 506998 0f223b4c9a71630afc580efe5c0b1894309b92fd
parent 506997 7b73044f0618cd59277967b5201fb529d58caea3
child 506999 fd00df2e0aba5a0d0d2a000937929a1da2f2e2f4
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschunmin
bugs1499903
milestone65.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 1499903 - part3 : change 'mLogicallySeeking' to Watchable r=chunmin Nobody is mirroring to 'mLogicallySeeking', so we can just use Watchable instead. Differential Revision: https://phabricator.services.mozilla.com/D9642
dom/media/MediaDecoder.cpp
dom/media/MediaDecoder.h
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -292,25 +292,25 @@ MediaDecoder::MediaDecoder(MediaDecoderI
       mMinimizePreroll(aInit.mMinimizePreroll),
       mFiredMetadataLoaded(false),
       mIsDocumentVisible(false),
       mElementVisibility(Visibility::UNTRACKED),
       mIsElementInTree(false),
       mForcedHidden(false),
       mHasSuspendTaint(aInit.mHasSuspendTaint),
       mPlaybackRate(aInit.mPlaybackRate),
+      mLogicallySeeking(false, "MediaDecoder::mLogicallySeeking"),
       INIT_MIRROR(mBuffered, TimeIntervals()),
       INIT_MIRROR(mCurrentPosition, TimeUnit::Zero()),
       INIT_MIRROR(mStateMachineDuration, NullableTimeUnit()),
       INIT_MIRROR(mIsAudioDataAudible, false),
       INIT_CANONICAL(mVolume, aInit.mVolume),
       INIT_CANONICAL(mPreservesPitch, aInit.mPreservesPitch),
       INIT_CANONICAL(mLooping, aInit.mLooping),
       INIT_CANONICAL(mPlayState, PLAY_STATE_LOADING),
-      INIT_CANONICAL(mLogicallySeeking, false),
       INIT_CANONICAL(mSameOriginMedia, false),
       INIT_CANONICAL(mMediaPrincipalHandle, PRINCIPAL_HANDLE_NONE),
       mVideoDecodingOberver(
           new BackgroundVideoDecodingPermissionObserver(this)),
       mIsBackgroundVideoDecodingAllowed(false),
       mTelemetryReported(false),
       mContainerType(aInit.mContainerType) {
   MOZ_ASSERT(NS_IsMainThread());
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -569,16 +569,19 @@ class MediaDecoder : public DecoderDocto
   MediaEventListener mOnWaitingForKey;
   MediaEventListener mOnDecodeWarning;
   MediaEventListener mOnNextFrameStatus;
 
  protected:
   // PlaybackRate and pitch preservation status we should start at.
   double mPlaybackRate;
 
+  // True if the decoder is seeking.
+  Watchable<bool> mLogicallySeeking;
+
   // Buffered range, mirrored from the reader.
   Mirror<media::TimeIntervals> mBuffered;
 
   // NB: Don't use mCurrentPosition directly, but rather CurrentPosition().
   Mirror<media::TimeUnit> mCurrentPosition;
 
   // Duration of the media resource according to the state machine.
   Mirror<media::NullableTimeUnit> mStateMachineDuration;
@@ -601,19 +604,16 @@ class MediaDecoder : public DecoderDocto
   // This can only be changed on the main thread while holding the decoder
   // monitor. Thus, it can be safely read while holding the decoder monitor
   // OR on the main thread.
   Canonical<PlayState> mPlayState;
 
   // This can only be changed on the main thread.
   PlayState mNextState = PLAY_STATE_PAUSED;
 
-  // True if the decoder is seeking.
-  Canonical<bool> mLogicallySeeking;
-
   // True if the media is same-origin with the element. Data can only be
   // passed to MediaStreams when this is true.
   Canonical<bool> mSameOriginMedia;
 
   // An identifier for the principal of the media. Used to track when
   // main-thread induced principal changes get reflected on MSG thread.
   Canonical<PrincipalHandle> mMediaPrincipalHandle;
 
@@ -628,19 +628,16 @@ class MediaDecoder : public DecoderDocto
 
  public:
   AbstractCanonical<double>* CanonicalVolume() { return &mVolume; }
   AbstractCanonical<bool>* CanonicalPreservesPitch() {
     return &mPreservesPitch;
   }
   AbstractCanonical<bool>* CanonicalLooping() { return &mLooping; }
   AbstractCanonical<PlayState>* CanonicalPlayState() { return &mPlayState; }
-  AbstractCanonical<bool>* CanonicalLogicallySeeking() {
-    return &mLogicallySeeking;
-  }
   AbstractCanonical<bool>* CanonicalSameOriginMedia() {
     return &mSameOriginMedia;
   }
   AbstractCanonical<PrincipalHandle>* CanonicalMediaPrincipalHandle() {
     return &mMediaPrincipalHandle;
   }
 
  private: