Bug 1314552. Part 2 - remove unused canonical. draft
authorJW Wang <jwwang@mozilla.com>
Wed, 02 Nov 2016 17:23:37 +0800
changeset 434658 1105d2ca9b647504fac3f364c9631fab49dfae44
parent 434657 24ce421e72867323c05851bbff14514657bd3c55
child 434659 4ced360b44ec42404fa2d7d8da3952372affef38
push id34784
push userjwwang@mozilla.com
push dateMon, 07 Nov 2016 03:12:00 +0000
bugs1314552
milestone52.0a1
Bug 1314552. Part 2 - remove unused canonical. MozReview-Commit-ID: FW6Wj1iiadS
dom/media/MediaDecoder.cpp
dom/media/MediaDecoder.h
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -392,17 +392,16 @@ MediaDecoder::MediaDecoder(MediaDecoderO
   , INIT_CANONICAL(mPlayState, PLAY_STATE_LOADING)
   , INIT_CANONICAL(mNextState, PLAY_STATE_PAUSED)
   , INIT_CANONICAL(mLogicallySeeking, false)
   , INIT_CANONICAL(mSameOriginMedia, false)
   , INIT_CANONICAL(mMediaPrincipalHandle, PRINCIPAL_HANDLE_NONE)
   , INIT_CANONICAL(mPlaybackBytesPerSecond, 0.0)
   , INIT_CANONICAL(mPlaybackRateReliable, true)
   , INIT_CANONICAL(mDecoderPosition, 0)
-  , INIT_CANONICAL(mMediaSeekableOnlyInBufferedRanges, false)
   , INIT_CANONICAL(mIsVisible, !aOwner->IsHidden())
   , mTelemetryReported(false)
 {
   MOZ_COUNT_CTOR(MediaDecoder);
   MOZ_ASSERT(NS_IsMainThread());
   MediaMemoryTracker::AddMediaDecoder(this);
 
   mAudioChannel = AudioChannelService::GetDefaultAudioChannel();
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -658,16 +658,20 @@ protected:
   bool mMediaTracksConstructed;
 
   // True if we've already fired metadataloaded.
   bool mFiredMetadataLoaded;
 
   // True if the media is seekable (i.e. supports random access).
   bool mMediaSeekable = true;
 
+  // True if the media is only seekable within its buffered ranges
+  // like WebMs with no cues.
+  bool mMediaSeekableOnlyInBufferedRanges = false;
+
   // Stores media info, including info of audio tracks and video tracks, should
   // only be accessed from main thread.
   nsAutoPtr<MediaInfo> mInfo;
 
   // Tracks the visiblity status from HTMLMediaElement
   bool mElementVisible;
 
   // If true, forces the decoder to be considered hidden.
@@ -757,20 +761,16 @@ protected:
   Canonical<bool> mPlaybackRateReliable;
 
   // Current decoding position in the stream. This is where the decoder
   // is up to consuming the stream. This is not adjusted during decoder
   // seek operations, but it's updated at the end when we start playing
   // back again.
   Canonical<int64_t> mDecoderPosition;
 
-  // True if the media is only seekable within its buffered ranges
-  // like WebMs with no cues.
-  Canonical<bool> mMediaSeekableOnlyInBufferedRanges;
-
   // True if the decoder is visible.
   Canonical<bool> mIsVisible;
 
 public:
   AbstractCanonical<media::NullableTimeUnit>* CanonicalDurationOrNull() override;
   AbstractCanonical<double>* CanonicalVolume() {
     return &mVolume;
   }
@@ -802,19 +802,16 @@ public:
     return &mPlaybackBytesPerSecond;
   }
   AbstractCanonical<bool>* CanonicalPlaybackRateReliable() {
     return &mPlaybackRateReliable;
   }
   AbstractCanonical<int64_t>* CanonicalDecoderPosition() {
     return &mDecoderPosition;
   }
-  AbstractCanonical<bool>* CanonicalMediaSeekableOnlyInBufferedRanges() {
-    return &mMediaSeekableOnlyInBufferedRanges;
-  }
   AbstractCanonical<bool>* CanonicalIsVisible() {
     return &mIsVisible;
   }
 
 private:
   // Notify owner when the audible state changed
   void NotifyAudibleStateChanged();