From 694dff250f079112b134600318e9f0002dec6e77 Mon Sep 17 00:00:00 2001 From: JW Wang Date: Wed, 13 Jul 2016 16:35:37 +0800 Subject: [PATCH] Bug 1289004. Part 1 - Constify and devirtualize some functions. r=cpearce. MozReview-Commit-ID: 8f14ekpinCR --HG-- extra : rebase_source : ca1d62df789639817e4c7da01919783038db22f0 extra : source : 5dc15cac9b631fd10b03902b3ba627fd763a49aa --- dom/media/MediaDecoder.cpp | 2 +- dom/media/MediaDecoder.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dom/media/MediaDecoder.cpp b/dom/media/MediaDecoder.cpp index 41b5b7570860..b82fd8136e2d 100644 --- a/dom/media/MediaDecoder.cpp +++ b/dom/media/MediaDecoder.cpp @@ -482,7 +482,7 @@ MediaDecoder::SetInfinite(bool aInfinite) } bool -MediaDecoder::IsInfinite() +MediaDecoder::IsInfinite() const { MOZ_ASSERT(NS_IsMainThread()); return mInfiniteStream; diff --git a/dom/media/MediaDecoder.h b/dom/media/MediaDecoder.h index 4d88a1d93022..c144765e40ca 100644 --- a/dom/media/MediaDecoder.h +++ b/dom/media/MediaDecoder.h @@ -220,7 +220,7 @@ public: virtual double GetDuration(); // Return true if the stream is infinite (see SetInfinite). - virtual bool IsInfinite(); + bool IsInfinite() const; // Called by MediaResource when some data has been received. // Call on the main thread only. @@ -232,12 +232,12 @@ public: // Return true if we are currently seeking in the media resource. // Call on the main thread only. - virtual bool IsSeeking() const; + bool IsSeeking() const; // Return true if the decoder has reached the end of playback or the decoder // has shutdown. // Call on the main thread only. - virtual bool IsEndedOrShutdown() const; + bool IsEndedOrShutdown() const; // Return true if the MediaDecoderOwner's error attribute is not null. // If the MediaDecoder is shutting down, OwnerHasError will return true.