Bug 1265634. Part 3 - constify some functions. r=jya.
authorJW Wang <jwwang@mozilla.com>
Wed, 20 Apr 2016 16:02:37 +0800
changeset 331875 f2d195c7313f2c58f5a4bf6d6614adf0ef53b275
parent 331874 e6fa15a5e1d7699fc95f6e66256de4e04c3e9ff5
child 331876 efd7dcae14fafe98cd887414da25070932e51676
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1265634
milestone48.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 1265634. Part 3 - constify some functions. r=jya. MozReview-Commit-ID: Lq0vZoeaK1l
dom/media/MediaDecoderStateMachine.cpp
dom/media/MediaDecoderStateMachine.h
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -2695,23 +2695,23 @@ MediaDecoderStateMachine::SizeOfVideoQue
 
 size_t
 MediaDecoderStateMachine::SizeOfAudioQueue() const
 {
   return mReader->SizeOfAudioQueueInBytes();
 }
 
 AbstractCanonical<media::TimeIntervals>*
-MediaDecoderStateMachine::CanonicalBuffered()
+MediaDecoderStateMachine::CanonicalBuffered() const
 {
   return mReader->CanonicalBuffered();
 }
 
 MediaEventSource<void>&
-MediaDecoderStateMachine::OnMediaNotSeekable()
+MediaDecoderStateMachine::OnMediaNotSeekable() const
 {
   return mReader->OnMediaNotSeekable();
 }
 
 } // namespace mozilla
 
 // avoid redefined macro in unified build
 #undef LOG
--- a/dom/media/MediaDecoderStateMachine.h
+++ b/dom/media/MediaDecoderStateMachine.h
@@ -217,17 +217,17 @@ public:
     MOZ_ASSERT(NS_IsMainThread());
     mResource = nullptr;
   }
 
   TimedMetadataEventSource& TimedMetadataEvent() {
     return mMetadataManager.TimedMetadataEvent();
   }
 
-  MediaEventSource<void>& OnMediaNotSeekable();
+  MediaEventSource<void>& OnMediaNotSeekable() const;
 
   MediaEventSourceExc<nsAutoPtr<MediaInfo>,
                       nsAutoPtr<MetadataTags>,
                       MediaDecoderEventVisibility>&
   MetadataLoadedEvent() { return mMetadataLoadedEvent; }
 
   MediaEventSourceExc<nsAutoPtr<MediaInfo>,
                       MediaDecoderEventVisibility>&
@@ -1034,17 +1034,17 @@ private:
 
   // Current playback position in the stream in bytes.
   Canonical<int64_t> mPlaybackOffset;
 
   // Used to distiguish whether the audio is producing sound.
   Canonical<bool> mIsAudioDataAudible;
 
 public:
-  AbstractCanonical<media::TimeIntervals>* CanonicalBuffered();
+  AbstractCanonical<media::TimeIntervals>* CanonicalBuffered() const;
 
   AbstractCanonical<media::NullableTimeUnit>* CanonicalDuration() {
     return &mDuration;
   }
   AbstractCanonical<bool>* CanonicalIsShutdown() {
     return &mIsShutdown;
   }
   AbstractCanonical<NextFrameStatus>* CanonicalNextFrameStatus() {