Bug 1240411: P9. Clean up media headers. r=jwwang
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 18 Jan 2016 14:50:29 +1100
changeset 280555 a8e790bd76e444d5ebaaee56809b094a72dfe480
parent 280554 a43cba50892e489efa874404048a9553ee942738
child 280556 048b9519ef896c714c51d20ec4a5a6100c8f4581
push id29919
push usercbook@mozilla.com
push dateWed, 20 Jan 2016 14:34:52 +0000
treeherdermozilla-central@6764bc656c1d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwwang
bugs1240411
milestone46.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 1240411: P9. Clean up media headers. r=jwwang Remove redundant virtual keyword and add missing override if any.
dom/media/AudioSegment.h
dom/media/AudioStreamTrack.h
dom/media/AudioTrack.h
dom/media/AudioTrackList.h
dom/media/BufferMediaResource.h
dom/media/CanvasCaptureMediaStream.cpp
dom/media/CanvasCaptureMediaStream.h
dom/media/GetUserMediaRequest.h
dom/media/GraphDriver.h
dom/media/MediaFormatReader.h
dom/media/MediaInfo.h
dom/media/MediaManager.cpp
dom/media/MediaRecorder.h
dom/media/MediaResource.cpp
dom/media/MediaResource.h
dom/media/MediaSegment.h
dom/media/MediaStreamError.h
dom/media/MediaStreamGraph.cpp
dom/media/MediaStreamGraph.h
dom/media/RtspMediaResource.h
dom/media/SharedBuffer.h
dom/media/TextTrack.h
dom/media/TextTrackCue.h
dom/media/TextTrackCueList.h
dom/media/TextTrackList.h
dom/media/TextTrackRegion.h
dom/media/TrackUnionStream.h
dom/media/VideoSegment.h
dom/media/VideoStreamTrack.h
dom/media/VideoTrack.h
dom/media/VideoTrackList.h
dom/media/encoder/MediaEncoder.h
dom/media/encoder/TrackEncoder.h
dom/media/gtest/MockMediaDecoderOwner.h
dom/media/gtest/MockMediaResource.h
dom/media/gtest/TestAudioCompactor.cpp
dom/media/gtest/TestGMPCrossOrigin.cpp
dom/media/imagecapture/CaptureTask.h
dom/media/imagecapture/ImageCapture.h
dom/media/systemservices/LoadManager.h
--- a/dom/media/AudioSegment.h
+++ b/dom/media/AudioSegment.h
@@ -21,28 +21,28 @@ namespace mozilla {
 template<typename T>
 class SharedChannelArrayBuffer : public ThreadSharedObject {
 public:
   explicit SharedChannelArrayBuffer(nsTArray<nsTArray<T> >* aBuffers)
   {
     mBuffers.SwapElements(*aBuffers);
   }
 
-  virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
+  size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     size_t amount = 0;
     amount += mBuffers.ShallowSizeOfExcludingThis(aMallocSizeOf);
     for (size_t i = 0; i < mBuffers.Length(); i++) {
       amount += mBuffers[i].ShallowSizeOfExcludingThis(aMallocSizeOf);
     }
 
     return amount;
   }
 
-  virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
+  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 
   nsTArray<nsTArray<T> > mBuffers;
 };
 
 class AudioMixer;
@@ -379,17 +379,17 @@ public:
         return false;
       }
     }
     return true;
   }
 
   static Type StaticType() { return AUDIO; }
 
-  virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
+  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 };
 
 template<typename SrcT>
 void WriteChunk(AudioChunk& aChunk,
                 uint32_t aOutputChannels,
--- a/dom/media/AudioStreamTrack.h
+++ b/dom/media/AudioStreamTrack.h
@@ -12,20 +12,20 @@
 namespace mozilla {
 namespace dom {
 
 class AudioStreamTrack : public MediaStreamTrack {
 public:
   AudioStreamTrack(DOMMediaStream* aStream, TrackID aTrackID, const nsString& aLabel)
     : MediaStreamTrack(aStream, aTrackID, aLabel) {}
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
-  virtual AudioStreamTrack* AsAudioStreamTrack() override { return this; }
+  AudioStreamTrack* AsAudioStreamTrack() override { return this; }
 
   // WebIDL
-  virtual void GetKind(nsAString& aKind) override { aKind.AssignLiteral("audio"); }
+  void GetKind(nsAString& aKind) override { aKind.AssignLiteral("audio"); }
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif /* AUDIOSTREAMTRACK_H_ */
--- a/dom/media/AudioTrack.h
+++ b/dom/media/AudioTrack.h
@@ -16,24 +16,24 @@ class AudioTrack : public MediaTrack
 {
 public:
   AudioTrack(const nsAString& aId,
              const nsAString& aKind,
              const nsAString& aLabel,
              const nsAString& aLanguage,
              bool aEnabled);
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
-  virtual AudioTrack* AsAudioTrack() override
+  AudioTrack* AsAudioTrack() override
   {
     return this;
   }
 
-  virtual void SetEnabledInternal(bool aEnabled, int aFlags) override;
+  void SetEnabledInternal(bool aEnabled, int aFlags) override;
 
   // WebIDL
   bool Enabled() const
   {
     return mEnabled;
   }
 
   void SetEnabled(bool aEnabled);
--- a/dom/media/AudioTrackList.h
+++ b/dom/media/AudioTrackList.h
@@ -16,25 +16,25 @@ namespace dom {
 class AudioTrack;
 
 class AudioTrackList : public MediaTrackList
 {
 public:
   AudioTrackList(nsPIDOMWindow* aOwnerWindow, HTMLMediaElement* aMediaElement)
     : MediaTrackList(aOwnerWindow, aMediaElement) {}
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   AudioTrack* operator[](uint32_t aIndex);
 
   // WebIDL
   AudioTrack* IndexedGetter(uint32_t aIndex, bool& aFound);
 
   AudioTrack* GetTrackById(const nsAString& aId);
 
 protected:
-  virtual AudioTrackList* AsAudioTrackList() override { return this; }
+  AudioTrackList* AsAudioTrackList() override { return this; }
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_AudioTrackList_h
--- a/dom/media/BufferMediaResource.h
+++ b/dom/media/BufferMediaResource.h
@@ -35,102 +35,100 @@ public:
 
 protected:
   virtual ~BufferMediaResource()
   {
     MOZ_COUNT_DTOR(BufferMediaResource);
   }
 
 private:
-  virtual nsresult Close() override { return NS_OK; }
-  virtual void Suspend(bool aCloseImmediately) override {}
-  virtual void Resume() override {}
+  nsresult Close() override { return NS_OK; }
+  void Suspend(bool aCloseImmediately) override {}
+  void Resume() override {}
   // Get the current principal for the channel
-  virtual already_AddRefed<nsIPrincipal> GetCurrentPrincipal() override
+  already_AddRefed<nsIPrincipal> GetCurrentPrincipal() override
   {
     nsCOMPtr<nsIPrincipal> principal = mPrincipal;
     return principal.forget();
   }
-  virtual bool CanClone() override { return false; }
-  virtual already_AddRefed<MediaResource> CloneData(MediaResourceCallback*) override
+  bool CanClone() override { return false; }
+  already_AddRefed<MediaResource> CloneData(MediaResourceCallback*) override
   {
     return nullptr;
   }
 
   // These methods are called off the main thread.
   // The mode is initially MODE_PLAYBACK.
-  virtual void SetReadMode(MediaCacheStream::ReadMode aMode) override {}
-  virtual void SetPlaybackRate(uint32_t aBytesPerSecond) override {}
-  virtual nsresult ReadAt(int64_t aOffset, char* aBuffer,
-                          uint32_t aCount, uint32_t* aBytes) override
+  void SetReadMode(MediaCacheStream::ReadMode aMode) override {}
+  void SetPlaybackRate(uint32_t aBytesPerSecond) override {}
+  nsresult ReadAt(int64_t aOffset, char* aBuffer,
+                  uint32_t aCount, uint32_t* aBytes) override
   {
     if (aOffset < 0 || aOffset > mLength) {
       return NS_ERROR_FAILURE;
     }
     *aBytes = std::min(mLength - static_cast<uint32_t>(aOffset), aCount);
     memcpy(aBuffer, mBuffer + aOffset, *aBytes);
     mOffset = aOffset + *aBytes;
     return NS_OK;
   }
-  virtual int64_t Tell() override { return mOffset; }
+  int64_t Tell() override { return mOffset; }
 
-  virtual void Pin() override {}
-  virtual void Unpin() override {}
-  virtual double GetDownloadRate(bool* aIsReliable) override { *aIsReliable = false; return 0.; }
-  virtual int64_t GetLength() override { return mLength; }
-  virtual int64_t GetNextCachedData(int64_t aOffset) override { return aOffset; }
-  virtual int64_t GetCachedDataEnd(int64_t aOffset) override { return mLength; }
-  virtual bool IsDataCachedToEndOfResource(int64_t aOffset) override { return true; }
-  virtual bool IsSuspendedByCache() override { return false; }
-  virtual bool IsSuspended() override { return false; }
-  virtual nsresult ReadFromCache(char* aBuffer,
-                                 int64_t aOffset,
-                                 uint32_t aCount) override
+  void Pin() override {}
+  void Unpin() override {}
+  double GetDownloadRate(bool* aIsReliable) override { *aIsReliable = false; return 0.; }
+  int64_t GetLength() override { return mLength; }
+  int64_t GetNextCachedData(int64_t aOffset) override { return aOffset; }
+  int64_t GetCachedDataEnd(int64_t aOffset) override { return mLength; }
+  bool IsDataCachedToEndOfResource(int64_t aOffset) override { return true; }
+  bool IsSuspendedByCache() override { return false; }
+  bool IsSuspended() override { return false; }
+  nsresult ReadFromCache(char* aBuffer,
+                         int64_t aOffset,
+                         uint32_t aCount) override
   {
     if (aOffset < 0) {
       return NS_ERROR_FAILURE;
     }
 
     uint32_t bytes = std::min(mLength - static_cast<uint32_t>(aOffset), aCount);
     memcpy(aBuffer, mBuffer + aOffset, bytes);
     return NS_OK;
   }
 
-  virtual nsresult Open(nsIStreamListener** aStreamListener) override
+  nsresult Open(nsIStreamListener** aStreamListener) override
   {
     return NS_ERROR_FAILURE;
   }
 
-  virtual nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override
+  nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override
   {
     aRanges += MediaByteRange(0, int64_t(mLength));
     return NS_OK;
   }
 
   bool IsTransportSeekable() override { return true; }
 
-  virtual const nsCString& GetContentType() const override
+  const nsCString& GetContentType() const override
   {
     return mContentType;
   }
 
-  virtual size_t SizeOfExcludingThis(
-                        MallocSizeOf aMallocSizeOf) const override
+  size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     // Not owned:
     // - mBuffer
     // - mPrincipal
     size_t size = MediaResource::SizeOfExcludingThis(aMallocSizeOf);
     size += mContentType.SizeOfExcludingThisIfUnshared(aMallocSizeOf);
 
     return size;
   }
 
-  virtual size_t SizeOfIncludingThis(
-                        MallocSizeOf aMallocSizeOf) const override
+  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 
 private:
   const uint8_t * mBuffer;
   uint32_t mLength;
   uint32_t mOffset;
--- a/dom/media/CanvasCaptureMediaStream.cpp
+++ b/dom/media/CanvasCaptureMediaStream.cpp
@@ -39,17 +39,17 @@ public:
   }
 
   void SetImage(const RefPtr<layers::Image>& aImage)
   {
     MutexAutoLock lock(mMutex);
     mImage = aImage;
   }
 
-  virtual void NotifyPull(MediaStreamGraph* aGraph, StreamTime aDesiredTime) override
+  void NotifyPull(MediaStreamGraph* aGraph, StreamTime aDesiredTime) override
   {
     // Called on the MediaStreamGraph thread.
     StreamTime delta = aDesiredTime - mSourceStream->GetEndOfAppendedData(mTrackId);
     if (delta > 0) {
       MutexAutoLock lock(mMutex);
       MOZ_ASSERT(mSourceStream);
 
       RefPtr<Image> image = mImage;
--- a/dom/media/CanvasCaptureMediaStream.h
+++ b/dom/media/CanvasCaptureMediaStream.h
@@ -98,17 +98,17 @@ class CanvasCaptureMediaStream : public 
 public:
   explicit CanvasCaptureMediaStream(HTMLCanvasElement* aCanvas);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(CanvasCaptureMediaStream, DOMMediaStream)
 
   nsresult Init(const dom::Optional<double>& aFPS, const TrackID& aTrackId);
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   // WebIDL
   HTMLCanvasElement* Canvas() const { return mCanvas; }
   void RequestFrame();
   dom::FrameCaptureListener* FrameCaptureListener();
 
   /**
    * Create a CanvasCaptureMediaStream whose underlying stream is a SourceMediaStream.
--- a/dom/media/GetUserMediaRequest.h
+++ b/dom/media/GetUserMediaRequest.h
@@ -23,18 +23,17 @@ public:
   GetUserMediaRequest(nsPIDOMWindow* aInnerWindow,
                       const nsAString& aCallID,
                       const MediaStreamConstraints& aConstraints,
                       bool aIsSecure);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(GetUserMediaRequest)
 
-  virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto)
-    override;
+  JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto) override;
   nsISupports* GetParentObject();
 
   uint64_t WindowID();
   uint64_t InnerWindowID();
   bool IsSecure();
   void GetCallID(nsString& retval);
   void GetConstraints(MediaStreamConstraints &result);
 
--- a/dom/media/GraphDriver.h
+++ b/dom/media/GraphDriver.h
@@ -253,31 +253,31 @@ class MediaStreamGraphInitThreadRunnable
 /**
  * This class is a driver that manages its own thread.
  */
 class ThreadedDriver : public GraphDriver
 {
 public:
   explicit ThreadedDriver(MediaStreamGraphImpl* aGraphImpl);
   virtual ~ThreadedDriver();
-  virtual void Start() override;
-  virtual void Stop() override;
-  virtual void Resume() override;
-  virtual void Revive() override;
+  void Start() override;
+  void Stop() override;
+  void Resume() override;
+  void Revive() override;
   /**
    * Runs main control loop on the graph thread. Normally a single invocation
    * of this runs for the entire lifetime of the graph thread.
    */
   void RunThread();
   friend class MediaStreamGraphInitThreadRunnable;
-  virtual uint32_t IterationDuration() override {
+  uint32_t IterationDuration() override {
     return MEDIA_GRAPH_TARGET_PERIOD_MS;
   }
 
-  virtual bool OnThread() override { return !mThread || NS_GetCurrentThread() == mThread; }
+  bool OnThread() override { return !mThread || NS_GetCurrentThread() == mThread; }
 
   /* When the graph wakes up to do an iteration, implementations return the
    * range of time that will be processed.  This is called only once per
    * iteration; it may determine the interval from state in a previous
    * call. */
   virtual MediaTime GetIntervalForIteration() = 0;
 protected:
   nsCOMPtr<nsIThread> mThread;
@@ -287,19 +287,19 @@ protected:
  * A SystemClockDriver drives a MediaStreamGraph using a system clock, and waits
  * using a monitor, between each iteration.
  */
 class SystemClockDriver : public ThreadedDriver
 {
 public:
   explicit SystemClockDriver(MediaStreamGraphImpl* aGraphImpl);
   virtual ~SystemClockDriver();
-  virtual MediaTime GetIntervalForIteration() override;
-  virtual void WaitForNextIteration() override;
-  virtual void WakeUp() override;
+  MediaTime GetIntervalForIteration() override;
+  void WaitForNextIteration() override;
+  void WakeUp() override;
 
 
 private:
   // Those are only modified (after initialization) on the graph thread. The
   // graph thread does not run during the initialization.
   TimeStamp mInitialTimeStamp;
   TimeStamp mLastTimeStamp;
 };
@@ -308,21 +308,21 @@ private:
  * An OfflineClockDriver runs the graph as fast as possible, without waiting
  * between iteration.
  */
 class OfflineClockDriver : public ThreadedDriver
 {
 public:
   OfflineClockDriver(MediaStreamGraphImpl* aGraphImpl, GraphTime aSlice);
   virtual ~OfflineClockDriver();
-  virtual MediaTime GetIntervalForIteration() override;
-  virtual void WaitForNextIteration() override;
-  virtual void WakeUp() override;
-  virtual TimeStamp GetCurrentTimeStamp() override;
-  virtual OfflineClockDriver* AsOfflineClockDriver() override {
+  MediaTime GetIntervalForIteration() override;
+  void WaitForNextIteration() override;
+  void WakeUp() override;
+  TimeStamp GetCurrentTimeStamp() override;
+  OfflineClockDriver* AsOfflineClockDriver() override {
     return this;
   }
 
 private:
   // Time, in GraphTime, for each iteration
   GraphTime mSlice;
 };
 
@@ -363,23 +363,23 @@ enum AsyncCubebOperation {
  */
 class AudioCallbackDriver : public GraphDriver,
                             public MixerCallbackReceiver
 {
 public:
   explicit AudioCallbackDriver(MediaStreamGraphImpl* aGraphImpl);
   virtual ~AudioCallbackDriver();
 
-  virtual void Destroy() override;
-  virtual void Start() override;
-  virtual void Stop() override;
-  virtual void Resume() override;
-  virtual void Revive() override;
-  virtual void WaitForNextIteration() override;
-  virtual void WakeUp() override;
+  void Destroy() override;
+  void Start() override;
+  void Stop() override;
+  void Resume() override;
+  void Revive() override;
+  void WaitForNextIteration() override;
+  void WakeUp() override;
 
   /* Static wrapper function cubeb calls back. */
   static long DataCallback_s(cubeb_stream * aStream,
                              void * aUser, void * aBuffer,
                              long aFrames);
   static void StateCallback_s(cubeb_stream* aStream, void * aUser,
                               cubeb_state aState);
   static void DeviceChangedCallback_s(void * aUser);
@@ -389,27 +389,27 @@ public:
    * called again. If it is less than aFrames, the stream will go in draining
    * mode, and this function will not be called again. */
   long DataCallback(AudioDataValue* aBuffer, long aFrames);
   /* This function is called by the underlying audio backend, but is only used
    * for informational purposes at the moment. */
   void StateCallback(cubeb_state aState);
   /* This is an approximation of the number of millisecond there are between two
    * iterations of the graph. */
-  virtual uint32_t IterationDuration() override;
+  uint32_t IterationDuration() override;
 
   /* This function gets called when the graph has produced the audio frames for
    * this iteration. */
-  virtual void MixerCallback(AudioDataValue* aMixedBuffer,
-                             AudioSampleFormat aFormat,
-                             uint32_t aChannels,
-                             uint32_t aFrames,
-                             uint32_t aSampleRate) override;
+  void MixerCallback(AudioDataValue* aMixedBuffer,
+                     AudioSampleFormat aFormat,
+                     uint32_t aChannels,
+                     uint32_t aFrames,
+                     uint32_t aSampleRate) override;
 
-  virtual AudioCallbackDriver* AsAudioCallbackDriver() override {
+  AudioCallbackDriver* AsAudioCallbackDriver() override {
     return this;
   }
 
   /* Enqueue a promise that is going to be resolved when a specific operation
    * occurs on the cubeb stream. */
   void EnqueueStreamAndPromiseForOperation(MediaStream* aStream,
                                          void* aPromise,
                                          dom::AudioContextOperation aOperation);
@@ -422,17 +422,17 @@ public:
 #endif
   }
 
   /**
    * Whether the audio callback is processing. This is for asserting only.
    */
   bool InCallback();
 
-  virtual bool OnThread() override { return !mStarted || InCallback(); }
+  bool OnThread() override { return !mStarted || InCallback(); }
 
   /* Whether the underlying cubeb stream has been started. See comment for
    * mStarted for details. */
   bool IsStarted();
 
   /* Tell the driver whether this process is using a microphone or not. This is
    * thread safe. */
   void SetMicrophoneActive(bool aActive);
--- a/dom/media/MediaFormatReader.h
+++ b/dom/media/MediaFormatReader.h
@@ -50,17 +50,17 @@ public:
   Seek(int64_t aTime, int64_t aUnused) override;
 
 protected:
   void NotifyDataArrivedInternal() override;
 
 public:
   media::TimeIntervals GetBuffered() override;
 
-  virtual bool ForceZeroStartTime() const override;
+  bool ForceZeroStartTime() const override;
 
   // For Media Resource Management
   void ReleaseMediaResources() override;
 
   nsresult ResetDecode() override;
 
   RefPtr<ShutdownPromise> Shutdown() override;
 
--- a/dom/media/MediaInfo.h
+++ b/dom/media/MediaInfo.h
@@ -195,32 +195,32 @@ public:
     , mDisplay(aOther.mDisplay)
     , mStereoMode(aOther.mStereoMode)
     , mImage(aOther.mImage)
     , mCodecSpecificConfig(aOther.mCodecSpecificConfig)
     , mExtraData(aOther.mExtraData)
   {
   }
 
-  virtual bool IsValid() const override
+  bool IsValid() const override
   {
     return mDisplay.width > 0 && mDisplay.height > 0;
   }
 
-  virtual VideoInfo* GetAsVideoInfo() override
+  VideoInfo* GetAsVideoInfo() override
   {
     return this;
   }
 
-  virtual const VideoInfo* GetAsVideoInfo() const override
+  const VideoInfo* GetAsVideoInfo() const override
   {
     return this;
   }
 
-  virtual UniquePtr<TrackInfo> Clone() const override
+  UniquePtr<TrackInfo> Clone() const override
   {
     return MakeUnique<VideoInfo>(*this);
   }
 
   // Size in pixels at which the video is rendered. This is after it has
   // been scaled by its aspect ratio.
   nsIntSize mDisplay;
 
@@ -255,32 +255,32 @@ public:
     , mBitDepth(aOther.mBitDepth)
     , mProfile(aOther.mProfile)
     , mExtendedProfile(aOther.mExtendedProfile)
     , mCodecSpecificConfig(aOther.mCodecSpecificConfig)
     , mExtraData(aOther.mExtraData)
   {
   }
 
-  virtual bool IsValid() const override
+  bool IsValid() const override
   {
     return mChannels > 0 && mRate > 0;
   }
 
-  virtual AudioInfo* GetAsAudioInfo() override
+  AudioInfo* GetAsAudioInfo() override
   {
     return this;
   }
 
-  virtual const AudioInfo* GetAsAudioInfo() const override
+  const AudioInfo* GetAsAudioInfo() const override
   {
     return this;
   }
 
-  virtual UniquePtr<TrackInfo> Clone() const override
+  UniquePtr<TrackInfo> Clone() const override
   {
     return MakeUnique<AudioInfo>(*this);
   }
 
   // Sample rate.
   uint32_t mRate;
 
   // Number of audio channels.
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -698,33 +698,33 @@ public:
       GetSourceStream()->Destroy();
     }
   }
 
   // For gUM streams, we have a trackunion which assigns TrackIDs.  However, for a
   // single-source trackunion like we have here, the TrackUnion will assign trackids
   // that match the source's trackids, so we can avoid needing a mapping function.
   // XXX This will not handle more complex cases well.
-  virtual void StopTrack(TrackID aTrackID) override
+  void StopTrack(TrackID aTrackID) override
   {
     if (GetSourceStream()) {
       GetSourceStream()->EndTrack(aTrackID);
       // We could override NotifyMediaStreamTrackEnded(), and maybe should, but it's
       // risky to do late in a release since that will affect all track ends, and not
       // just StopTrack()s.
       RefPtr<dom::MediaStreamTrack> ownedTrack = FindOwnedDOMTrack(mOwnedStream, aTrackID);
       if (ownedTrack) {
         mListener->StopTrack(aTrackID, !!ownedTrack->AsAudioStreamTrack());
       } else {
         LOG(("StopTrack(%d) on non-existent track", aTrackID));
       }
     }
   }
 
-  virtual already_AddRefed<Promise>
+  already_AddRefed<Promise>
   ApplyConstraintsToTrack(TrackID aTrackID,
                           const MediaTrackConstraints& aConstraints,
                           ErrorResult &aRv) override
   {
     nsPIDOMWindow* window = static_cast<nsPIDOMWindow*>(mWindow.get());
     nsCOMPtr<nsIGlobalObject> go = do_QueryInterface(window);
     RefPtr<Promise> promise = Promise::Create(go, aRv);
 
@@ -776,53 +776,53 @@ public:
     mListener->StopTrack(trackID, !!aTrack->AsAudioStreamTrack());
 
     // forward to superclass
     DOMLocalMediaStream::NotifyMediaStreamTrackEnded(aTrack);
   }
 #endif
 
   // Allow getUserMedia to pass input data directly to PeerConnection/MediaPipeline
-  virtual bool AddDirectListener(MediaStreamDirectListener *aListener) override
+  bool AddDirectListener(MediaStreamDirectListener *aListener) override
   {
     if (GetSourceStream()) {
       GetSourceStream()->AddDirectListener(aListener);
       return true; // application should ignore NotifyQueuedTrackData
     }
     return false;
   }
 
-  virtual void
+  void
   AudioConfig(bool aEchoOn, uint32_t aEcho,
               bool aAgcOn, uint32_t aAgc,
               bool aNoiseOn, uint32_t aNoise,
               int32_t aPlayoutDelay)
   {
     mEchoOn = aEchoOn;
     mEcho = aEcho;
     mAgcOn = aAgcOn;
     mAgc = aAgc;
     mNoiseOn = aNoiseOn;
     mNoise = aNoise;
     mPlayoutDelay = aPlayoutDelay;
   }
 
-  virtual void RemoveDirectListener(MediaStreamDirectListener *aListener) override
+  void RemoveDirectListener(MediaStreamDirectListener *aListener) override
   {
     if (GetSourceStream()) {
       GetSourceStream()->RemoveDirectListener(aListener);
     }
   }
 
-  virtual DOMLocalMediaStream* AsDOMLocalMediaStream() override
+  DOMLocalMediaStream* AsDOMLocalMediaStream() override
   {
     return this;
   }
 
-  virtual MediaEngineSource* GetMediaEngine(TrackID aTrackID) override
+  MediaEngineSource* GetMediaEngine(TrackID aTrackID) override
   {
     // MediaEngine supports only one video and on video track now and TrackID is
     // fixed in MediaEngine.
     if (aTrackID == kVideoTrack) {
       return mVideoDevice ? mVideoDevice->GetSource() : nullptr;
     }
     else if (aTrackID == kAudioTrack) {
       return mAudioDevice ? mAudioDevice->GetSource() : nullptr;
@@ -915,17 +915,17 @@ public:
   {
   public:
     TracksAvailableCallback(MediaManager* aManager,
                             nsIDOMGetUserMediaSuccessCallback* aSuccess,
                             uint64_t aWindowID,
                             DOMMediaStream* aStream)
       : mWindowID(aWindowID), mOnSuccess(aSuccess), mManager(aManager),
         mStream(aStream) {}
-    virtual void NotifyTracksAvailable(DOMMediaStream* aStream) override
+    void NotifyTracksAvailable(DOMMediaStream* aStream) override
     {
       // We're in the main thread, so no worries here.
       if (!(mManager->IsWindowStillActive(mWindowID))) {
         return;
       }
 
       // Start currentTime from the point where this stream was successfully
       // returned.
@@ -2662,18 +2662,18 @@ MediaManager::Shutdown()
   class ShutdownTask : public Task
   {
   public:
     ShutdownTask(MediaManager* aManager,
                  nsRunnable* aReply)
       : mManager(aManager)
       , mReply(aReply) {}
   private:
-    virtual void
-    Run()
+    void
+    Run() override
     {
       LOG(("MediaManager Thread Shutdown"));
       MOZ_ASSERT(MediaManager::IsInMediaThread());
       // Must shutdown backend on MediaManager thread, since that's where we started it from!
       {
         if (mManager->mBackend) {
           mManager->mBackend->Shutdown(); // ok to invoke multiple times
         }
--- a/dom/media/MediaRecorder.h
+++ b/dom/media/MediaRecorder.h
@@ -43,17 +43,17 @@ class MediaRecorder final : public DOMEv
 {
   class Session;
 
 public:
   MediaRecorder(DOMMediaStream& aSourceMediaStream, nsPIDOMWindow* aOwnerWindow);
   MediaRecorder(AudioNode& aSrcAudioNode, uint32_t aSrcOutput, nsPIDOMWindow* aOwnerWindow);
 
   // nsWrapperCache
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   nsPIDOMWindow* GetParentObject() { return GetOwner(); }
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaRecorder,
                                            DOMEventTargetHelper)
 
   // WebIDL
--- a/dom/media/MediaResource.cpp
+++ b/dom/media/MediaResource.cpp
@@ -1146,80 +1146,78 @@ public:
     mSizeInitialized(false)
   {
   }
   ~FileMediaResource()
   {
   }
 
   // Main thread
-  virtual nsresult Open(nsIStreamListener** aStreamListener) override;
-  virtual nsresult Close() override;
-  virtual void     Suspend(bool aCloseImmediately) override {}
-  virtual void     Resume() override {}
-  virtual already_AddRefed<nsIPrincipal> GetCurrentPrincipal() override;
-  virtual bool     CanClone() override;
-  virtual already_AddRefed<MediaResource> CloneData(MediaResourceCallback* aCallback) override;
-  virtual nsresult ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCount) override;
+  nsresult Open(nsIStreamListener** aStreamListener) override;
+  nsresult Close() override;
+  void     Suspend(bool aCloseImmediately) override {}
+  void     Resume() override {}
+  already_AddRefed<nsIPrincipal> GetCurrentPrincipal() override;
+  bool     CanClone() override;
+  already_AddRefed<MediaResource> CloneData(MediaResourceCallback* aCallback) override;
+  nsresult ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCount) override;
 
   // These methods are called off the main thread.
 
   // Other thread
-  virtual void     SetReadMode(MediaCacheStream::ReadMode aMode) override {}
-  virtual void     SetPlaybackRate(uint32_t aBytesPerSecond) override {}
-  virtual nsresult ReadAt(int64_t aOffset, char* aBuffer,
-                          uint32_t aCount, uint32_t* aBytes) override;
-  virtual already_AddRefed<MediaByteBuffer> MediaReadAt(int64_t aOffset, uint32_t aCount) override;
-  virtual int64_t  Tell() override;
+  void     SetReadMode(MediaCacheStream::ReadMode aMode) override {}
+  void     SetPlaybackRate(uint32_t aBytesPerSecond) override {}
+  nsresult ReadAt(int64_t aOffset, char* aBuffer,
+                  uint32_t aCount, uint32_t* aBytes) override;
+  already_AddRefed<MediaByteBuffer> MediaReadAt(int64_t aOffset, uint32_t aCount) override;
+  int64_t  Tell() override;
 
   // Any thread
-  virtual void    Pin() override {}
-  virtual void    Unpin() override {}
-  virtual double  GetDownloadRate(bool* aIsReliable) override
+  void    Pin() override {}
+  void    Unpin() override {}
+  double  GetDownloadRate(bool* aIsReliable) override
   {
     // The data's all already here
     *aIsReliable = true;
     return 100*1024*1024; // arbitray, use 100MB/s
   }
-  virtual int64_t GetLength() override {
+  int64_t GetLength() override {
     MutexAutoLock lock(mLock);
 
     EnsureSizeInitialized();
     return mSizeInitialized ? mSize : 0;
   }
-  virtual int64_t GetNextCachedData(int64_t aOffset) override
+  int64_t GetNextCachedData(int64_t aOffset) override
   {
     MutexAutoLock lock(mLock);
 
     EnsureSizeInitialized();
     return (aOffset < mSize) ? aOffset : -1;
   }
-  virtual int64_t GetCachedDataEnd(int64_t aOffset) override {
+  int64_t GetCachedDataEnd(int64_t aOffset) override {
     MutexAutoLock lock(mLock);
 
     EnsureSizeInitialized();
     return std::max(aOffset, mSize);
   }
-  virtual bool    IsDataCachedToEndOfResource(int64_t aOffset) override { return true; }
-  virtual bool    IsSuspendedByCache() override { return true; }
-  virtual bool    IsSuspended() override { return true; }
-  virtual bool    IsTransportSeekable() override { return true; }
+  bool    IsDataCachedToEndOfResource(int64_t aOffset) override { return true; }
+  bool    IsSuspendedByCache() override { return true; }
+  bool    IsSuspended() override { return true; }
+  bool    IsTransportSeekable() override { return true; }
 
   nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override;
 
-  virtual size_t SizeOfExcludingThis(
-                        MallocSizeOf aMallocSizeOf) const override
+  size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     // Might be useful to track in the future:
     // - mInput
     return BaseMediaResource::SizeOfExcludingThis(aMallocSizeOf);
   }
 
-  virtual size_t SizeOfIncludingThis(
-                        MallocSizeOf aMallocSizeOf) const override
+  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 
 protected:
   // These Unsafe variants of Read and Seek perform their operations
   // without acquiring mLock. The caller must obtain the lock before
   // calling. The implmentation of Read, Seek and ReadAt obtains the
--- a/dom/media/MediaResource.h
+++ b/dom/media/MediaResource.h
@@ -375,35 +375,33 @@ protected:
   virtual ~MediaResource() {};
 
 private:
   void Destroy();
 };
 
 class BaseMediaResource : public MediaResource {
 public:
-  virtual nsIURI* URI() const override { return mURI; }
-  virtual void SetLoadInBackground(bool aLoadInBackground) override;
+  nsIURI* URI() const override { return mURI; }
+  void SetLoadInBackground(bool aLoadInBackground) override;
 
-  virtual size_t SizeOfExcludingThis(
-                  MallocSizeOf aMallocSizeOf) const override
+  size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     // Might be useful to track in the future:
     // - mChannel
     // - mURI (possibly owned, looks like just a ref from mChannel)
     // Not owned:
     // - mCallback
     size_t size = MediaResource::SizeOfExcludingThis(aMallocSizeOf);
     size += mContentType.SizeOfExcludingThisIfUnshared(aMallocSizeOf);
 
     return size;
   }
 
-  virtual size_t SizeOfIncludingThis(
-                  MallocSizeOf aMallocSizeOf) const override
+  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 
   // Returns the url of the resource. Safe to call from any thread?
   const nsCString& GetContentURL() const
   {
     return mContentURL;
@@ -424,17 +422,17 @@ protected:
     NS_ASSERTION(!mContentType.IsEmpty(), "Must know content type");
     mURI->GetSpec(mContentURL);
   }
   virtual ~BaseMediaResource()
   {
     MOZ_COUNT_DTOR(BaseMediaResource);
   }
 
-  virtual const nsCString& GetContentType() const override
+  const nsCString& GetContentType() const override
   {
     return mContentType;
   }
 
   // Set the request's load flags to aFlags.  If the request is part of a
   // load group, the request is removed from the group, the flags are set, and
   // then the request is added back to the load group.
   void ModifyLoadFlags(nsLoadFlags aFlags);
@@ -551,78 +549,76 @@ public:
   nsresult CacheClientSeek(int64_t aOffset, bool aResume);
   // Suspend the current load since data is currently not wanted
   nsresult CacheClientSuspend();
   // Resume the current load since data is wanted again
   nsresult CacheClientResume();
 
   // Ensure that the media cache writes any data held in its partial block.
   // Called on the main thread.
-  virtual void FlushCache() override;
+  void FlushCache() override;
 
   // Notify that the last data byte range was loaded.
-  virtual void NotifyLastByteRange() override;
+  void NotifyLastByteRange() override;
 
   // Main thread
-  virtual nsresult Open(nsIStreamListener** aStreamListener) override;
-  virtual nsresult Close() override;
-  virtual void     Suspend(bool aCloseImmediately) override;
-  virtual void     Resume() override;
-  virtual already_AddRefed<nsIPrincipal> GetCurrentPrincipal() override;
+  nsresult Open(nsIStreamListener** aStreamListener) override;
+  nsresult Close() override;
+  void     Suspend(bool aCloseImmediately) override;
+  void     Resume() override;
+  already_AddRefed<nsIPrincipal> GetCurrentPrincipal() override;
   // Return true if the stream has been closed.
-  bool IsClosed() const { return mCacheStream.IsClosed(); }
-  virtual bool     CanClone() override;
-  virtual already_AddRefed<MediaResource> CloneData(MediaResourceCallback* aDecoder) override;
+  bool     IsClosed() const { return mCacheStream.IsClosed(); }
+  bool     CanClone() override;
+  already_AddRefed<MediaResource> CloneData(MediaResourceCallback* aDecoder) override;
   // Set statistics to be recorded to the object passed in. If not called,
   // |ChannelMediaResource| will create it's own statistics objects in |Open|.
   void RecordStatisticsTo(MediaChannelStatistics *aStatistics) override {
     NS_ASSERTION(aStatistics, "Statistics param cannot be null!");
     MutexAutoLock lock(mLock);
     if (!mChannelStatistics) {
       mChannelStatistics = aStatistics;
     }
   }
-  virtual nsresult ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCount) override;
-  virtual void     EnsureCacheUpToDate() override;
+  nsresult ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCount) override;
+  void     EnsureCacheUpToDate() override;
 
   // Other thread
-  virtual void     SetReadMode(MediaCacheStream::ReadMode aMode) override;
-  virtual void     SetPlaybackRate(uint32_t aBytesPerSecond) override;
-  virtual nsresult ReadAt(int64_t offset, char* aBuffer,
-                          uint32_t aCount, uint32_t* aBytes) override;
-  virtual already_AddRefed<MediaByteBuffer> MediaReadAt(int64_t aOffset, uint32_t aCount) override;
-  virtual int64_t Tell() override;
+  void     SetReadMode(MediaCacheStream::ReadMode aMode) override;
+  void     SetPlaybackRate(uint32_t aBytesPerSecond) override;
+  nsresult ReadAt(int64_t offset, char* aBuffer,
+                  uint32_t aCount, uint32_t* aBytes) override;
+  already_AddRefed<MediaByteBuffer> MediaReadAt(int64_t aOffset, uint32_t aCount) override;
+  int64_t Tell() override;
 
   // Any thread
-  virtual void    Pin() override;
-  virtual void    Unpin() override;
-  virtual double  GetDownloadRate(bool* aIsReliable) override;
-  virtual int64_t GetLength() override;
-  virtual int64_t GetNextCachedData(int64_t aOffset) override;
-  virtual int64_t GetCachedDataEnd(int64_t aOffset) override;
-  virtual bool    IsDataCachedToEndOfResource(int64_t aOffset) override;
-  virtual bool    IsSuspendedByCache() override;
-  virtual bool    IsSuspended() override;
-  virtual bool    IsTransportSeekable() override;
+  void    Pin() override;
+  void    Unpin() override;
+  double  GetDownloadRate(bool* aIsReliable) override;
+  int64_t GetLength() override;
+  int64_t GetNextCachedData(int64_t aOffset) override;
+  int64_t GetCachedDataEnd(int64_t aOffset) override;
+  bool    IsDataCachedToEndOfResource(int64_t aOffset) override;
+  bool    IsSuspendedByCache() override;
+  bool    IsSuspended() override;
+  bool    IsTransportSeekable() override;
 
-  virtual size_t SizeOfExcludingThis(
-                      MallocSizeOf aMallocSizeOf) const override {
+  size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override {
     // Might be useful to track in the future:
     //   - mListener (seems minor)
     //   - mChannelStatistics (seems minor)
     //     owned if RecordStatisticsTo is not called
     //   - mDataReceivedEvent (seems minor)
     size_t size = BaseMediaResource::SizeOfExcludingThis(aMallocSizeOf);
     size += mCacheStream.SizeOfExcludingThis(aMallocSizeOf);
 
     return size;
   }
 
-  virtual size_t SizeOfIncludingThis(
-                      MallocSizeOf aMallocSizeOf) const override {
+  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 
   class Listener final : public nsIStreamListener,
                          public nsIInterfaceRequestor,
                          public nsIChannelEventSink
   {
     ~Listener() {}
@@ -637,17 +633,17 @@ public:
 
     void Revoke() { mResource = nullptr; }
 
   private:
     RefPtr<ChannelMediaResource> mResource;
   };
   friend class Listener;
 
-  virtual nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override;
+  nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override;
 
 protected:
   // These are called on the main thread by Listener.
   nsresult OnStartRequest(nsIRequest* aRequest);
   nsresult OnStopRequest(nsIRequest* aRequest, nsresult aStatus);
   nsresult OnDataAvailable(nsIRequest* aRequest,
                            nsIInputStream* aStream,
                            uint32_t aCount);
--- a/dom/media/MediaSegment.h
+++ b/dom/media/MediaSegment.h
@@ -144,44 +144,44 @@ protected:
 };
 
 /**
  * C is the implementation class subclassed from MediaSegmentBase.
  * C must contain a Chunk class.
  */
 template <class C, class Chunk> class MediaSegmentBase : public MediaSegment {
 public:
-  virtual MediaSegment* CreateEmptyClone() const override
+  MediaSegment* CreateEmptyClone() const override
   {
     return new C();
   }
-  virtual void AppendFrom(MediaSegment* aSource) override
+  void AppendFrom(MediaSegment* aSource) override
   {
     NS_ASSERTION(aSource->GetType() == C::StaticType(), "Wrong type");
     AppendFromInternal(static_cast<C*>(aSource));
   }
   void AppendFrom(C* aSource)
   {
     AppendFromInternal(aSource);
   }
-  virtual void AppendSlice(const MediaSegment& aSource,
-                           StreamTime aStart, StreamTime aEnd) override
+  void AppendSlice(const MediaSegment& aSource,
+                   StreamTime aStart, StreamTime aEnd) override
   {
     NS_ASSERTION(aSource.GetType() == C::StaticType(), "Wrong type");
     AppendSliceInternal(static_cast<const C&>(aSource), aStart, aEnd);
   }
   void AppendSlice(const C& aOther, StreamTime aStart, StreamTime aEnd)
   {
     AppendSliceInternal(aOther, aStart, aEnd);
   }
   /**
    * Replace the first aDuration ticks with null media data, because the data
    * will not be required again.
    */
-  virtual void ForgetUpTo(StreamTime aDuration) override
+  void ForgetUpTo(StreamTime aDuration) override
   {
     if (mChunks.IsEmpty() || aDuration <= 0) {
       return;
     }
     if (mChunks[0].IsNull()) {
       StreamTime extraToForget = std::min(aDuration, mDuration) - mChunks[0].GetDuration();
       if (extraToForget > 0) {
         RemoveLeading(extraToForget, 1);
@@ -189,17 +189,17 @@ public:
         mDuration += extraToForget;
       }
       return;
     }
     RemoveLeading(aDuration, 0);
     mChunks.InsertElementAt(0)->SetNull(aDuration);
     mDuration += aDuration;
   }
-  virtual void FlushAfter(StreamTime aNewEnd) override
+  void FlushAfter(StreamTime aNewEnd) override
   {
     if (mChunks.IsEmpty()) {
       return;
     }
 
     if (mChunks[0].IsNull()) {
       StreamTime extraToKeep = aNewEnd - mChunks[0].GetDuration();
       if (extraToKeep < 0) {
@@ -212,53 +212,53 @@ public:
       if (aNewEnd > mDuration) {
         NS_ASSERTION(aNewEnd <= mDuration, "can't add data in FlushAfter");
         return;
       }
       RemoveTrailing(aNewEnd, 0);
     }
     mDuration = aNewEnd;
   }
-  virtual void InsertNullDataAtStart(StreamTime aDuration) override
+  void InsertNullDataAtStart(StreamTime aDuration) override
   {
     if (aDuration <= 0) {
       return;
     }
     if (!mChunks.IsEmpty() && mChunks[0].IsNull()) {
       mChunks[0].mDuration += aDuration;
     } else {
       mChunks.InsertElementAt(0)->SetNull(aDuration);
     }
 #ifdef MOZILLA_INTERNAL_API
     mChunks[0].mTimeStamp = mozilla::TimeStamp::Now();
 #endif
     mDuration += aDuration;
   }
-  virtual void AppendNullData(StreamTime aDuration) override
+  void AppendNullData(StreamTime aDuration) override
   {
     if (aDuration <= 0) {
       return;
     }
     if (!mChunks.IsEmpty() && mChunks[mChunks.Length() - 1].IsNull()) {
       mChunks[mChunks.Length() - 1].mDuration += aDuration;
     } else {
       mChunks.AppendElement()->SetNull(aDuration);
     }
     mDuration += aDuration;
   }
-  virtual void ReplaceWithDisabled() override
+  void ReplaceWithDisabled() override
   {
     if (GetType() != AUDIO) {
       MOZ_CRASH("Disabling unknown segment type");
     }
     StreamTime duration = GetDuration();
     Clear();
     AppendNullData(duration);
   }
-  virtual void Clear() override
+  void Clear() override
   {
     mDuration = 0;
     mChunks.Clear();
   }
 
   class ChunkIterator {
   public:
     explicit ChunkIterator(MediaSegmentBase<C, Chunk>& aSegment)
@@ -310,26 +310,26 @@ public:
   }
 
 #ifdef MOZILLA_INTERNAL_API
   void GetStartTime(TimeStamp &aTime) {
     aTime = mChunks[0].mTimeStamp;
   }
 #endif
 
-  virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
+  size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     size_t amount = mChunks.ShallowSizeOfExcludingThis(aMallocSizeOf);
     for (size_t i = 0; i < mChunks.Length(); i++) {
       amount += mChunks[i].SizeOfExcludingThisIfUnshared(aMallocSizeOf);
     }
     return amount;
   }
 
-  virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
+  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 
 protected:
   explicit MediaSegmentBase(Type aType) : MediaSegment(aType) {}
 
   /**
--- a/dom/media/MediaStreamError.h
+++ b/dom/media/MediaStreamError.h
@@ -70,17 +70,17 @@ public:
                    const BaseMediaMgrError& aOther)
   : BaseMediaMgrError(aOther.mName, aOther.mMessage, aOther.mConstraint)
   , mParent(aParent) {}
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MediaStreamError)
   NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOM_MEDIASTREAMERROR_IMPLEMENTATION_IID)
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   nsPIDOMWindow* GetParentObject() const
   {
     return mParent;
   }
   void GetName(nsAString& aName) const;
   void GetMessage(nsAString& aMessage) const;
   void GetConstraint(nsAString& aConstraint) const;
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -1378,21 +1378,21 @@ private:
 };
 
 /*
  * Control messages forwarded from main thread to graph manager thread
  */
 class CreateMessage : public ControlMessage {
 public:
   explicit CreateMessage(MediaStream* aStream) : ControlMessage(aStream) {}
-  virtual void Run() override
+  void Run() override
   {
     mStream->GraphImpl()->AddStreamGraphThread(mStream);
   }
-  virtual void RunDuringShutdown() override
+  void RunDuringShutdown() override
   {
     // Make sure to run this message during shutdown too, to make sure
     // that we balance the number of streams registered with the graph
     // as they're destroyed during shutdown.
     Run();
   }
 };
 
@@ -1792,41 +1792,41 @@ void
 MediaStream::Destroy()
 {
   // Keep this stream alive until we leave this method
   RefPtr<MediaStream> kungFuDeathGrip = this;
 
   class Message : public ControlMessage {
   public:
     explicit Message(MediaStream* aStream) : ControlMessage(aStream) {}
-    virtual void Run()
+    void Run() override
     {
       mStream->RemoveAllListenersImpl();
       auto graph = mStream->GraphImpl();
       mStream->DestroyImpl();
       graph->RemoveStreamGraphThread(mStream);
     }
-    virtual void RunDuringShutdown()
+    void RunDuringShutdown() override
     { Run(); }
   };
   mWrapper = nullptr;
   GraphImpl()->AppendMessage(new Message(this));
   // Message::RunDuringShutdown may have removed this stream from the graph,
   // but our kungFuDeathGrip above will have kept this stream alive if
   // necessary.
   mMainThreadDestroyed = true;
 }
 
 void
 MediaStream::AddAudioOutput(void* aKey)
 {
   class Message : public ControlMessage {
   public:
     Message(MediaStream* aStream, void* aKey) : ControlMessage(aStream), mKey(aKey) {}
-    virtual void Run()
+    void Run() override
     {
       mStream->AddAudioOutputImpl(mKey);
     }
     void* mKey;
   };
   GraphImpl()->AppendMessage(new Message(this, aKey));
 }
 
@@ -1844,17 +1844,17 @@ MediaStream::SetAudioOutputVolumeImpl(vo
 
 void
 MediaStream::SetAudioOutputVolume(void* aKey, float aVolume)
 {
   class Message : public ControlMessage {
   public:
     Message(MediaStream* aStream, void* aKey, float aVolume) :
       ControlMessage(aStream), mKey(aKey), mVolume(aVolume) {}
-    virtual void Run()
+    void Run() override
     {
       mStream->SetAudioOutputVolumeImpl(mKey, mVolume);
     }
     void* mKey;
     float mVolume;
   };
   GraphImpl()->AppendMessage(new Message(this, aKey, aVolume));
 }
@@ -1883,17 +1883,17 @@ MediaStream::RemoveAudioOutputImpl(void*
 
 void
 MediaStream::RemoveAudioOutput(void* aKey)
 {
   class Message : public ControlMessage {
   public:
     Message(MediaStream* aStream, void* aKey) :
       ControlMessage(aStream), mKey(aKey) {}
-    virtual void Run()
+    void Run() override
     {
       mStream->RemoveAudioOutputImpl(mKey);
     }
     void* mKey;
   };
   GraphImpl()->AppendMessage(new Message(this, aKey));
 }
 
@@ -1919,49 +1919,49 @@ MediaStream::RemoveVideoOutputImpl(Video
 
 void
 MediaStream::AddVideoOutput(VideoFrameContainer* aContainer)
 {
   class Message : public ControlMessage {
   public:
     Message(MediaStream* aStream, VideoFrameContainer* aContainer) :
       ControlMessage(aStream), mContainer(aContainer) {}
-    virtual void Run()
+    void Run() override
     {
       mStream->AddVideoOutputImpl(mContainer.forget());
     }
     RefPtr<VideoFrameContainer> mContainer;
   };
   GraphImpl()->AppendMessage(new Message(this, aContainer));
 }
 
 void
 MediaStream::RemoveVideoOutput(VideoFrameContainer* aContainer)
 {
   class Message : public ControlMessage {
   public:
     Message(MediaStream* aStream, VideoFrameContainer* aContainer) :
       ControlMessage(aStream), mContainer(aContainer) {}
-    virtual void Run()
+    void Run() override
     {
       mStream->RemoveVideoOutputImpl(mContainer);
     }
     RefPtr<VideoFrameContainer> mContainer;
   };
   GraphImpl()->AppendMessage(new Message(this, aContainer));
 }
 
 void
 MediaStream::Suspend()
 {
   class Message : public ControlMessage {
   public:
     explicit Message(MediaStream* aStream) :
       ControlMessage(aStream) {}
-    virtual void Run()
+    void Run() override
     {
       mStream->GraphImpl()->IncrementSuspendCount(mStream);
     }
   };
 
   // This can happen if this method has been called asynchronously, and the
   // stream has been destroyed since then.
   if (mMainThreadDestroyed) {
@@ -1972,17 +1972,17 @@ MediaStream::Suspend()
 
 void
 MediaStream::Resume()
 {
   class Message : public ControlMessage {
   public:
     explicit Message(MediaStream* aStream) :
       ControlMessage(aStream) {}
-    virtual void Run()
+    void Run() override
     {
       mStream->GraphImpl()->DecrementSuspendCount(mStream);
     }
   };
 
   // This can happen if this method has been called asynchronously, and the
   // stream has been destroyed since then.
   if (mMainThreadDestroyed) {
@@ -2007,17 +2007,17 @@ MediaStream::AddListenerImpl(already_Add
 
 void
 MediaStream::AddListener(MediaStreamListener* aListener)
 {
   class Message : public ControlMessage {
   public:
     Message(MediaStream* aStream, MediaStreamListener* aListener) :
       ControlMessage(aStream), mListener(aListener) {}
-    virtual void Run()
+    void Run() override
     {
       mStream->AddListenerImpl(mListener.forget());
     }
     RefPtr<MediaStreamListener> mListener;
   };
   GraphImpl()->AppendMessage(new Message(this, aListener));
 }
 
@@ -2032,17 +2032,17 @@ MediaStream::RemoveListenerImpl(MediaStr
 
 void
 MediaStream::RemoveListener(MediaStreamListener* aListener)
 {
   class Message : public ControlMessage {
   public:
     Message(MediaStream* aStream, MediaStreamListener* aListener) :
       ControlMessage(aStream), mListener(aListener) {}
-    virtual void Run()
+    void Run() override
     {
       mStream->RemoveListenerImpl(mListener);
     }
     RefPtr<MediaStreamListener> mListener;
   };
   // If the stream is destroyed the Listeners have or will be
   // removed.
   if (!IsDestroyed()) {
@@ -2065,22 +2065,22 @@ MediaStream::RunAfterPendingUpdates(alre
   }
 
   class Message : public ControlMessage {
   public:
     explicit Message(MediaStream* aStream,
                      already_AddRefed<nsIRunnable> aRunnable)
       : ControlMessage(aStream)
       , mRunnable(aRunnable) {}
-    virtual void Run() override
+    void Run() override
     {
       mStream->Graph()->
         DispatchToMainThreadAfterStreamStateUpdate(mRunnable.forget());
     }
-    virtual void RunDuringShutdown() override
+    void RunDuringShutdown() override
     {
       // Don't run mRunnable now as it may call AppendMessage() which would
       // assume that there are no remaining controlMessagesToRunDuringShutdown.
       MOZ_ASSERT(NS_IsMainThread());
       NS_DispatchToCurrentThread(mRunnable);
     }
   private:
     nsCOMPtr<nsIRunnable> mRunnable;
@@ -2103,17 +2103,17 @@ MediaStream::SetTrackEnabledImpl(TrackID
 
 void
 MediaStream::SetTrackEnabled(TrackID aTrackID, bool aEnabled)
 {
   class Message : public ControlMessage {
   public:
     Message(MediaStream* aStream, TrackID aTrackID, bool aEnabled) :
       ControlMessage(aStream), mTrackID(aTrackID), mEnabled(aEnabled) {}
-    virtual void Run()
+    void Run() override
     {
       mStream->SetTrackEnabledImpl(mTrackID, mEnabled);
     }
     TrackID mTrackID;
     bool mEnabled;
   };
   GraphImpl()->AppendMessage(new Message(this, aTrackID, aEnabled));
 }
@@ -2311,17 +2311,17 @@ SourceMediaStream::NotifyListenersEventI
 
 void
 SourceMediaStream::NotifyListenersEvent(MediaStreamListener::MediaStreamGraphEvent aNewEvent)
 {
   class Message : public ControlMessage {
   public:
     Message(SourceMediaStream* aStream, MediaStreamListener::MediaStreamGraphEvent aEvent) :
       ControlMessage(aStream), mEvent(aEvent) {}
-    virtual void Run()
+    void Run() override
       {
         mStream->AsSourceStream()->NotifyListenersEventImpl(mEvent);
       }
     MediaStreamListener::MediaStreamGraphEvent mEvent;
   };
   GraphImpl()->AppendMessage(new Message(this, aNewEvent));
 }
 
@@ -2476,24 +2476,24 @@ MediaInputPort::GetNextInputInterval(Gra
 
 void
 MediaInputPort::Destroy()
 {
   class Message : public ControlMessage {
   public:
     explicit Message(MediaInputPort* aPort)
       : ControlMessage(nullptr), mPort(aPort) {}
-    virtual void Run()
+    void Run() override
     {
       mPort->Disconnect();
       --mPort->GraphImpl()->mPortCount;
       mPort->SetGraphImpl(nullptr);
       NS_RELEASE(mPort);
     }
-    virtual void RunDuringShutdown()
+    void RunDuringShutdown() override
     {
       Run();
     }
     MediaInputPort* mPort;
   };
   GraphImpl()->AppendMessage(new Message(this));
 }
 
@@ -2525,21 +2525,21 @@ MediaInputPort::BlockTrackIdImpl(TrackID
 void
 MediaInputPort::BlockTrackId(TrackID aTrackId)
 {
   class Message : public ControlMessage {
   public:
     explicit Message(MediaInputPort* aPort, TrackID aTrackId)
       : ControlMessage(aPort->GetDestination()),
         mPort(aPort), mTrackId(aTrackId) {}
-    virtual void Run()
+    void Run() override
     {
       mPort->BlockTrackIdImpl(mTrackId);
     }
-    virtual void RunDuringShutdown()
+    void RunDuringShutdown() override
     {
       Run();
     }
     RefPtr<MediaInputPort> mPort;
     TrackID mTrackId;
   };
 
   MOZ_ASSERT(aTrackId != TRACK_NONE && aTrackId != TRACK_INVALID && aTrackId != TRACK_ANY,
@@ -2553,24 +2553,24 @@ ProcessedMediaStream::AllocateInputPort(
 {
   // This method creates two references to the MediaInputPort: one for
   // the main thread, and one for the MediaStreamGraph.
   class Message : public ControlMessage {
   public:
     explicit Message(MediaInputPort* aPort)
       : ControlMessage(aPort->GetDestination()),
         mPort(aPort) {}
-    virtual void Run()
+    void Run() override
     {
       mPort->Init();
       // The graph holds its reference implicitly
       mPort->GraphImpl()->SetStreamOrderDirty();
       Unused << mPort.forget();
     }
-    virtual void RunDuringShutdown()
+    void RunDuringShutdown() override
     {
       Run();
     }
     RefPtr<MediaInputPort> mPort;
   };
 
   MOZ_ASSERT(aStream->GraphImpl() == GraphImpl());
   MOZ_ASSERT(aTrackID != TRACK_NONE && aTrackID != TRACK_INVALID,
@@ -2584,32 +2584,32 @@ ProcessedMediaStream::AllocateInputPort(
 
 void
 ProcessedMediaStream::Finish()
 {
   class Message : public ControlMessage {
   public:
     explicit Message(ProcessedMediaStream* aStream)
       : ControlMessage(aStream) {}
-    virtual void Run()
+    void Run() override
     {
       mStream->GraphImpl()->FinishStream(mStream);
     }
   };
   GraphImpl()->AppendMessage(new Message(this));
 }
 
 void
 ProcessedMediaStream::SetAutofinish(bool aAutofinish)
 {
   class Message : public ControlMessage {
   public:
     Message(ProcessedMediaStream* aStream, bool aAutofinish)
       : ControlMessage(aStream), mAutofinish(aAutofinish) {}
-    virtual void Run()
+    void Run() override
     {
       static_cast<ProcessedMediaStream*>(mStream)->SetAutofinishImpl(mAutofinish);
     }
     bool mAutofinish;
   };
   GraphImpl()->AppendMessage(new Message(this, aAutofinish));
 }
 
@@ -2914,34 +2914,34 @@ MediaStreamGraph::NotifyWhenGraphStarted
 
   class GraphStartedNotificationControlMessage : public ControlMessage
   {
   public:
     explicit GraphStartedNotificationControlMessage(AudioNodeStream* aStream)
       : ControlMessage(aStream)
     {
     }
-    virtual void Run()
+    void Run() override
     {
       // This runs on the graph thread, so when this runs, and the current
       // driver is an AudioCallbackDriver, we know the audio hardware is
       // started. If not, we are going to switch soon, keep reposting this
       // ControlMessage.
       MediaStreamGraphImpl* graphImpl = mStream->GraphImpl();
       if (graphImpl->CurrentDriver()->AsAudioCallbackDriver()) {
         nsCOMPtr<nsIRunnable> event = new dom::StateChangeTask(
             mStream->AsAudioNodeStream(), nullptr, AudioContextState::Running);
         NS_DispatchToMainThread(event.forget());
       } else {
         nsCOMPtr<nsIRunnable> event = new GraphStartedRunnable(
             mStream->AsAudioNodeStream(), mStream->Graph());
         NS_DispatchToMainThread(event.forget());
       }
     }
-    virtual void RunDuringShutdown()
+    void RunDuringShutdown() override
     {
     }
   };
 
   if (!aStream->IsDestroyed()) {
     MediaStreamGraphImpl* graphImpl = static_cast<MediaStreamGraphImpl*>(this);
     graphImpl->AppendMessage(new GraphStartedNotificationControlMessage(aStream));
   }
@@ -3139,22 +3139,22 @@ MediaStreamGraph::ApplyAudioContextOpera
                                         AudioContextOperation aOperation,
                                         void* aPromise)
       : ControlMessage(aDestinationStream)
       , mStreams(aStreams)
       , mAudioContextOperation(aOperation)
       , mPromise(aPromise)
     {
     }
-    virtual void Run()
+    void Run() override
     {
       mStream->GraphImpl()->ApplyAudioContextOperationImpl(mStream,
         mStreams, mAudioContextOperation, mPromise);
     }
-    virtual void RunDuringShutdown()
+    void RunDuringShutdown() override
     {
       MOZ_ASSERT(false, "We should be reviving the graph?");
     }
 
   private:
     // We don't need strong references here for the same reason ControlMessage
     // doesn't.
     nsTArray<MediaStream*> mStreams;
--- a/dom/media/MediaStreamGraph.h
+++ b/dom/media/MediaStreamGraph.h
@@ -693,20 +693,20 @@ public:
     MediaStream(aWrapper),
     mMutex("mozilla::media::SourceMediaStream"),
     mUpdateKnownTracksTime(0),
     mPullEnabled(false),
     mUpdateFinished(false),
     mNeedsMixing(false)
   {}
 
-  virtual SourceMediaStream* AsSourceStream() override { return this; }
+  SourceMediaStream* AsSourceStream() override { return this; }
 
   // Media graph thread only
-  virtual void DestroyImpl() override;
+  void DestroyImpl() override;
 
   // Call these on any thread.
   /**
    * Enable or disable pulling. When pulling is enabled, NotifyPull
    * gets called on MediaStreamListeners for this stream during the
    * MediaStreamGraph control loop. Pulling is initially disabled.
    * Due to unavoidable race conditions, after a call to SetPullEnabled(false)
    * it is still possible for a NotifyPull to occur.
@@ -791,24 +791,24 @@ public:
   void FinishWithLockHeld();
   void Finish()
   {
     MutexAutoLock lock(mMutex);
     FinishWithLockHeld();
   }
 
   // Overriding allows us to hold the mMutex lock while changing the track enable status
-  virtual void
+  void
   SetTrackEnabledImpl(TrackID aTrackID, bool aEnabled) override {
     MutexAutoLock lock(mMutex);
     MediaStream::SetTrackEnabledImpl(aTrackID, aEnabled);
   }
 
   // Overriding allows us to ensure mMutex is locked while changing the track enable status
-  virtual void
+  void
   ApplyTrackDisabling(TrackID aTrackID, MediaSegment* aSegment,
                       MediaSegment* aRawSegment = nullptr) override {
     mMutex.AssertCurrentThreadOwns();
     MediaStream::ApplyTrackDisabling(aTrackID, aSegment, aRawSegment);
   }
 
   /**
    * End all tracks and Finish() this stream.  Used to voluntarily revoke access
@@ -1066,17 +1066,17 @@ public:
   void Finish();
   /**
    * Set the autofinish flag on this stream (defaults to false). When this flag
    * is set, and all input streams are in the finished state (including if there
    * are no input streams), this stream automatically enters the finished state.
    */
   void SetAutofinish(bool aAutofinish);
 
-  virtual ProcessedMediaStream* AsProcessedStream() override { return this; }
+  ProcessedMediaStream* AsProcessedStream() override { return this; }
 
   friend class MediaStreamGraphImpl;
 
   // Do not call these from outside MediaStreamGraph.cpp!
   virtual void AddInput(MediaInputPort* aPort);
   virtual void RemoveInput(MediaInputPort* aPort)
   {
     mInputs.RemoveElement(aPort);
@@ -1084,17 +1084,17 @@ public:
   bool HasInputPort(MediaInputPort* aPort)
   {
     return mInputs.Contains(aPort);
   }
   uint32_t InputPortCount()
   {
     return mInputs.Length();
   }
-  virtual void DestroyImpl() override;
+  void DestroyImpl() override;
   /**
    * This gets called after we've computed the blocking states for all
    * streams (mBlocked is up to date up to mStateComputedTime).
    * Also, we've produced output for all streams up to this one. If this stream
    * is not in a cycle, then all its source streams have produced data.
    * Generate output from aFrom to aTo.
    * This will be called on streams that have finished. Most stream types should
    * just return immediately if IsFinishedOnGraphThread(), but some may wish to
@@ -1112,26 +1112,26 @@ public:
   virtual void ProcessInput(GraphTime aFrom, GraphTime aTo, uint32_t aFlags) = 0;
   void SetAutofinishImpl(bool aAutofinish) { mAutofinish = aAutofinish; }
 
   // Only valid after MediaStreamGraphImpl::UpdateStreamOrder() has run.
   // A DelayNode is considered to break a cycle and so this will not return
   // true for echo loops, only for muted cycles.
   bool InMutedCycle() const { return mCycleMarker; }
 
-  virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
+  size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     size_t amount = MediaStream::SizeOfExcludingThis(aMallocSizeOf);
     // Not owned:
     // - mInputs elements
     amount += mInputs.ShallowSizeOfExcludingThis(aMallocSizeOf);
     return amount;
   }
 
-  virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
+  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 
 protected:
   // This state is all accessed only on the media graph thread.
 
   // The list of all inputs that are currently enabled or waiting to be enabled.
--- a/dom/media/RtspMediaResource.h
+++ b/dom/media/RtspMediaResource.h
@@ -74,32 +74,32 @@ public:
   RtspMediaResource(MediaResourceCallback* aCallback, nsIChannel* aChannel, nsIURI* aURI,
                     const nsACString& aContentType);
   virtual ~RtspMediaResource();
 
   // The following methods can be called on any thread.
 
   // Get the RtspMediaResource pointer if this MediaResource is a
   // RtspMediaResource. For calling Rtsp specific functions.
-  virtual RtspMediaResource* GetRtspPointer() override final {
+  RtspMediaResource* GetRtspPointer() override final {
     return this;
   }
 
   // Returns the nsIStreamingProtocolController in the RtspMediaResource.
   // RtspMediaExtractor: request it to get mime type for creating decoder.
   // RtspOmxDecoder: request it to send play/pause commands to RTSP server.
   // The lifetime of mMediaStreamController is controlled by RtspMediaResource
   // because the RtspMediaExtractor and RtspOmxDecoder won't hold the reference.
   nsIStreamingProtocolController* GetMediaStreamController() {
     return mMediaStreamController;
   }
 
   // Even it is a live stream, as long as it provides valid timestamps,
   // we tell state machine it's not a live stream.
-  virtual bool IsRealTime() override {
+  bool IsRealTime() override {
     return !mHasTimestamp;
   }
 
   // Called by RtspOmxReader, dispatch a runnable to notify mDecoder.
   // Other thread only.
   void SetSuspend(bool aIsSuspend);
 
   // The following methods can be called on any thread except main thread.
@@ -119,83 +119,80 @@ public:
 
   // The idea of playout delay is to hold frames in the playout buffer
   // (RtspTrackBuffer) for a period of time in order to smooth timing variations
   // caused by the network.
   void EnablePlayoutDelay();
   void DisablePlayoutDelay();
 
   // dummy
-  virtual nsresult ReadAt(int64_t aOffset, char* aBuffer,
-                          uint32_t aCount, uint32_t* aBytes)  override{
+  nsresult ReadAt(int64_t aOffset, char* aBuffer,
+                  uint32_t aCount, uint32_t* aBytes)  override{
     return NS_ERROR_FAILURE;
   }
   // dummy
-  virtual void     SetReadMode(MediaCacheStream::ReadMode aMode) override {}
+  void     SetReadMode(MediaCacheStream::ReadMode aMode) override {}
   // dummy
-  virtual void     SetPlaybackRate(uint32_t aBytesPerSecond) override {}
+  void     SetPlaybackRate(uint32_t aBytesPerSecond) override {}
   // dummy
-  virtual int64_t  Tell() override { return 0; }
+  int64_t  Tell() override { return 0; }
 
   // Any thread
-  virtual void    Pin() override {}
-  virtual void    Unpin() override {}
+  void    Pin() override {}
+  void    Unpin() override {}
 
-  virtual bool    IsSuspendedByCache() override { return mIsSuspend; }
+  bool    IsSuspendedByCache() override { return mIsSuspend; }
 
-  virtual bool    IsSuspended() override { return false; }
-  virtual bool    IsTransportSeekable() override { return true; }
+  bool    IsSuspended() override { return false; }
+  bool    IsTransportSeekable() override { return true; }
   // dummy
-  virtual double  GetDownloadRate(bool* aIsReliable) override { *aIsReliable = false; return 0; }
+  double  GetDownloadRate(bool* aIsReliable) override { *aIsReliable = false; return 0; }
 
-  virtual int64_t GetLength() override {
+  int64_t GetLength() override {
     if (mIsLiveStream) {
       return -1;
     }
     return 0;
   }
 
   // dummy
-  virtual int64_t GetNextCachedData(int64_t aOffset) override { return 0; }
+  int64_t GetNextCachedData(int64_t aOffset) override { return 0; }
   // dummy
-  virtual int64_t GetCachedDataEnd(int64_t aOffset) override { return 0; }
+  int64_t GetCachedDataEnd(int64_t aOffset) override { return 0; }
   // dummy
-  virtual bool    IsDataCachedToEndOfResource(int64_t aOffset) override {
+  bool    IsDataCachedToEndOfResource(int64_t aOffset) override {
     return false;
   }
   // dummy
   nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override {
     return NS_ERROR_FAILURE;
   }
 
   // The following methods can be called on main thread only.
 
-  virtual nsresult Open(nsIStreamListener** aStreamListener) override;
-  virtual nsresult Close() override;
-  virtual void     Suspend(bool aCloseImmediately) override;
-  virtual void     Resume() override;
-  virtual already_AddRefed<nsIPrincipal> GetCurrentPrincipal() override;
-  virtual bool     CanClone() override {
+  nsresult Open(nsIStreamListener** aStreamListener) override;
+  nsresult Close() override;
+  void     Suspend(bool aCloseImmediately) override;
+  void     Resume() override;
+  already_AddRefed<nsIPrincipal> GetCurrentPrincipal() override;
+  bool     CanClone() override {
     return false;
   }
-  virtual already_AddRefed<MediaResource> CloneData(MediaResourceCallback*)
-  override {
+  already_AddRefed<MediaResource> CloneData(MediaResourceCallback*) override {
     return nullptr;
   }
   // dummy
-  virtual nsresult ReadFromCache(char* aBuffer, int64_t aOffset,
+  nsresult ReadFromCache(char* aBuffer, int64_t aOffset,
                                  uint32_t aCount) override {
     return NS_ERROR_FAILURE;
   }
 
-  virtual size_t SizeOfExcludingThis(
-                      MallocSizeOf aMallocSizeOf) const override;
+  size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
 
-  virtual size_t SizeOfIncludingThis(
-                      MallocSizeOf aMallocSizeOf) const override {
+  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 
   // Listener implements nsIStreamingProtocolListener as
   // mMediaStreamController's callback function.
   // It holds RtspMediaResource reference to notify the connection status and
   // data arrival. The Revoke function releases the reference when
   // RtspMediaResource::OnDisconnected is called.
--- a/dom/media/SharedBuffer.h
+++ b/dom/media/SharedBuffer.h
@@ -62,17 +62,17 @@ public:
     }
     void* m = moz_xmalloc(size.value());
     RefPtr<SharedBuffer> p = new (m) SharedBuffer();
     NS_ASSERTION((reinterpret_cast<char*>(p.get() + 1) - reinterpret_cast<char*>(p.get())) % 4 == 0,
                  "SharedBuffers should be at least 4-byte aligned");
     return p.forget();
   }
 
-  virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
+  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 
 private:
   SharedBuffer() {}
 };
 
--- a/dom/media/TextTrack.h
+++ b/dom/media/TextTrack.h
@@ -54,17 +54,17 @@ public:
             const nsAString& aLabel,
             const nsAString& aLanguage,
             TextTrackMode aMode,
             TextTrackReadyState aReadyState,
             TextTrackSource aTextTrackSource);
 
   void SetDefaultSettings();
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   TextTrackKind Kind() const
   {
     return mKind;
   }
   void GetLabel(nsAString& aLabel) const
   {
     aLabel = mLabel;
--- a/dom/media/TextTrackCue.h
+++ b/dom/media/TextTrackCue.h
@@ -45,17 +45,17 @@ public:
   }
   TextTrackCue(nsPIDOMWindow* aGlobal, double aStartTime, double aEndTime,
                const nsAString& aText, ErrorResult& aRv);
 
   TextTrackCue(nsPIDOMWindow* aGlobal, double aStartTime, double aEndTime,
                const nsAString& aText, HTMLTrackElement* aTrackElement,
                ErrorResult& aRv);
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   TextTrack* GetTrack() const
   {
     return mTrack;
   }
 
   void GetId(nsAString& aId) const
   {
--- a/dom/media/TextTrackCueList.h
+++ b/dom/media/TextTrackCueList.h
@@ -23,17 +23,17 @@ class TextTrackCueList final : public ns
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TextTrackCueList)
 
   // TextTrackCueList WebIDL
   explicit TextTrackCueList(nsISupports* aParent);
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   nsISupports* GetParentObject() const
   {
     return mParent;
   }
 
   uint32_t Length() const
   {
--- a/dom/media/TextTrackList.h
+++ b/dom/media/TextTrackList.h
@@ -24,17 +24,17 @@ class TextTrackList final : public DOMEv
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TextTrackList, DOMEventTargetHelper)
 
   explicit TextTrackList(nsPIDOMWindow* aOwnerWindow);
   TextTrackList(nsPIDOMWindow* aOwnerWindow, TextTrackManager* aTextTrackManager);
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   uint32_t Length() const
   {
     return mTextTracks.Length();
   }
 
   // Get all the current active cues.
   void UpdateAndGetShowingCues(nsTArray<RefPtr<TextTrackCue> >& aCues);
--- a/dom/media/TextTrackRegion.h
+++ b/dom/media/TextTrackRegion.h
@@ -30,17 +30,17 @@ public:
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TextTrackRegion)
 
   static bool RegionsEnabled(JSContext* cx, JSObject* obj)
   {
     return Preferences::GetBool("media.webvtt.enabled") &&
            Preferences::GetBool("media.webvtt.regions.enabled");
   }
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   nsISupports* GetParentObject() const
   {
     return mParent;
   }
 
   explicit TextTrackRegion(nsISupports* aGlobal);
 
--- a/dom/media/TrackUnionStream.h
+++ b/dom/media/TrackUnionStream.h
@@ -13,18 +13,18 @@ namespace mozilla {
 
 /**
  * See MediaStreamGraph::CreateTrackUnionStream.
  */
 class TrackUnionStream : public ProcessedMediaStream {
 public:
   explicit TrackUnionStream(DOMMediaStream* aWrapper);
 
-  virtual void RemoveInput(MediaInputPort* aPort) override;
-  virtual void ProcessInput(GraphTime aFrom, GraphTime aTo, uint32_t aFlags) override;
+  void RemoveInput(MediaInputPort* aPort) override;
+  void ProcessInput(GraphTime aFrom, GraphTime aTo, uint32_t aFlags) override;
 
 protected:
   // Only non-ended tracks are allowed to persist in this map.
   struct TrackMapEntry {
     // mEndOfConsumedInputTicks is the end of the input ticks that we've consumed.
     // 0 if we haven't consumed any yet.
     StreamTime mEndOfConsumedInputTicks;
     // mEndOfLastInputIntervalInInputStream is the timestamp for the end of the
--- a/dom/media/VideoSegment.h
+++ b/dom/media/VideoSegment.h
@@ -124,28 +124,28 @@ public:
       return nullptr;
     }
     if (aStart) {
       *aStart = mDuration - c->mDuration;
     }
     return &c->mFrame;
   }
   // Override default impl
-  virtual void ReplaceWithDisabled() override {
+  void ReplaceWithDisabled() override {
     for (ChunkIterator i(*this);
          !i.IsEnded(); i.Next()) {
       VideoChunk& chunk = *i;
       chunk.SetForceBlack(true);
     }
   }
 
   // Segment-generic methods not in MediaSegmentBase
   static Type StaticType() { return VIDEO; }
 
-  virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
+  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 };
 
 } // namespace mozilla
 
 #endif /* MOZILLA_VIDEOSEGMENT_H_ */
--- a/dom/media/VideoStreamTrack.h
+++ b/dom/media/VideoStreamTrack.h
@@ -12,20 +12,20 @@
 namespace mozilla {
 namespace dom {
 
 class VideoStreamTrack : public MediaStreamTrack {
 public:
   VideoStreamTrack(DOMMediaStream* aStream, TrackID aTrackID, const nsString& aLabel)
     : MediaStreamTrack(aStream, aTrackID, aLabel) {}
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
-  virtual VideoStreamTrack* AsVideoStreamTrack() override { return this; }
+  VideoStreamTrack* AsVideoStreamTrack() override { return this; }
 
   // WebIDL
-  virtual void GetKind(nsAString& aKind) override { aKind.AssignLiteral("video"); }
+  void GetKind(nsAString& aKind) override { aKind.AssignLiteral("video"); }
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif /* VIDEOSTREAMTRACK_H_ */
--- a/dom/media/VideoTrack.h
+++ b/dom/media/VideoTrack.h
@@ -17,29 +17,29 @@ class VideoTrackList;
 class VideoTrack : public MediaTrack
 {
 public:
   VideoTrack(const nsAString& aId,
              const nsAString& aKind,
              const nsAString& aLabel,
              const nsAString& aLanguage);
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
-  virtual VideoTrack* AsVideoTrack() override
+  VideoTrack* AsVideoTrack() override
   {
     return this;
   }
 
   // When fetching media resource, if no video track is selected by the media
   // resource, then the first VideoTrack object in the list is set selected as
   // default. If multiple video tracks are selected by its media resource at
   // fetching phase, then the first enabled video track is set selected.
   // aFlags contains FIRE_NO_EVENTS because no events are fired in such cases.
-  virtual void SetEnabledInternal(bool aEnabled, int aFlags) override;
+  void SetEnabledInternal(bool aEnabled, int aFlags) override;
 
   // WebIDL
   bool Selected() const
   {
     return mSelected;
   }
 
   // Either zero or one video track is selected in a list; If the selected track
--- a/dom/media/VideoTrackList.h
+++ b/dom/media/VideoTrackList.h
@@ -18,36 +18,36 @@ class VideoTrack;
 class VideoTrackList : public MediaTrackList
 {
 public:
   VideoTrackList(nsPIDOMWindow* aOwnerWindow, HTMLMediaElement* aMediaElement)
     : MediaTrackList(aOwnerWindow, aMediaElement)
     , mSelectedIndex(-1)
   {}
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   VideoTrack* operator[](uint32_t aIndex);
 
-  virtual void EmptyTracks() override;
+  void EmptyTracks() override;
 
   // WebIDL
   int32_t SelectedIndex() const
   {
     return mSelectedIndex;
   }
 
   VideoTrack* IndexedGetter(uint32_t aIndex, bool& aFound);
 
   VideoTrack* GetTrackById(const nsAString& aId);
 
   friend class VideoTrack;
 
 protected:
-  virtual VideoTrackList* AsVideoTrackList() override { return this; }
+  VideoTrackList* AsVideoTrackList() override { return this; }
 
 private:
   int32_t mSelectedIndex;
 };
 
 } // namespace dom
 } // namespace mozilla
 
--- a/dom/media/encoder/MediaEncoder.h
+++ b/dom/media/encoder/MediaEncoder.h
@@ -77,28 +77,28 @@ public :
   {}
 
   ~MediaEncoder() {};
 
   /**
    * Notified by the control loop of MediaStreamGraph; aQueueMedia is the raw
    * track data in form of MediaSegment.
    */
-  virtual void NotifyQueuedTrackChanges(MediaStreamGraph* aGraph, TrackID aID,
-                                        StreamTime aTrackOffset,
-                                        uint32_t aTrackEvents,
-                                        const MediaSegment& aQueuedMedia,
-                                        MediaStream* aInputStream,
-                                        TrackID aInputTrackID) override;
+  void NotifyQueuedTrackChanges(MediaStreamGraph* aGraph, TrackID aID,
+                                StreamTime aTrackOffset,
+                                uint32_t aTrackEvents,
+                                const MediaSegment& aQueuedMedia,
+                                MediaStream* aInputStream,
+                                TrackID aInputTrackID) override;
 
   /**
    * Notified the stream is being removed.
    */
-  virtual void NotifyEvent(MediaStreamGraph* aGraph,
-                           MediaStreamListener::MediaStreamGraphEvent event) override;
+  void NotifyEvent(MediaStreamGraph* aGraph,
+                   MediaStreamListener::MediaStreamGraphEvent event) override;
 
   /**
    * Creates an encoder with a given MIME type. Returns null if we are unable
    * to create the encoder. For now, default aMIMEType to "audio/ogg" and use
    * Ogg+Opus if it is empty.
    */
   static already_AddRefed<MediaEncoder> CreateEncoder(const nsAString& aMIMEType,
                                                       uint32_t aAudioBitrate, uint32_t aVideoBitrate,
--- a/dom/media/encoder/TrackEncoder.h
+++ b/dom/media/encoder/TrackEncoder.h
@@ -141,20 +141,20 @@ class AudioTrackEncoder : public TrackEn
 public:
   AudioTrackEncoder()
     : TrackEncoder()
     , mChannels(0)
     , mSamplingRate(0)
     , mAudioBitrate(0)
   {}
 
-  virtual void NotifyQueuedTrackChanges(MediaStreamGraph* aGraph, TrackID aID,
-                                        StreamTime aTrackOffset,
-                                        uint32_t aTrackEvents,
-                                        const MediaSegment& aQueuedMedia) override;
+  void NotifyQueuedTrackChanges(MediaStreamGraph* aGraph, TrackID aID,
+                                StreamTime aTrackOffset,
+                                uint32_t aTrackEvents,
+                                const MediaSegment& aQueuedMedia) override;
 
   template<typename T>
   static
   void InterleaveTrackData(nsTArray<const T*>& aInput,
                            int32_t aDuration,
                            uint32_t aOutputChannels,
                            AudioDataValue* aOutput,
                            float aVolume)
@@ -189,17 +189,17 @@ public:
    */
   static void DeInterleaveTrackData(AudioDataValue* aInput, int32_t aDuration,
                                     int32_t aChannels, AudioDataValue* aOutput);
   /**
   * Measure size of mRawSegment
   */
   size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
 
-  virtual void SetBitrate(const uint32_t aBitrate) override
+  void SetBitrate(const uint32_t aBitrate) override
   {
     mAudioBitrate = aBitrate;
   }
 protected:
   /**
    * Number of samples per channel in a pcm buffer. This is also the value of
    * frame size required by audio encoder, and mReentrantMonitor will be
    * notified when at least this much data has been added to mRawSegment.
@@ -222,17 +222,17 @@ protected:
    * method which is waiting for more data from mRawSegment.
    */
   nsresult AppendAudioSegment(const AudioSegment& aSegment);
 
   /**
    * Notifies the audio encoder that we have reached the end of source stream,
    * and wakes up mReentrantMonitor if encoder is waiting for more track data.
    */
-  virtual void NotifyEndOfStream() override;
+  void NotifyEndOfStream() override;
 
   /**
    * The number of channels are used for processing PCM data in the audio encoder.
    * This value comes from the first valid audio chunk. If encoder can't support
    * the channels in the chunk, downmix PCM stream can be performed.
    * This value also be used to initialize the audio encoder.
    */
   int mChannels;
@@ -263,26 +263,26 @@ public:
     , mTotalFrameDuration(0)
     , mVideoBitrate(0)
   {}
 
   /**
    * Notified by the same callback of MediaEncoder when it has received a track
    * change from MediaStreamGraph. Called on the MediaStreamGraph thread.
    */
-  virtual void NotifyQueuedTrackChanges(MediaStreamGraph* aGraph, TrackID aID,
-                                        StreamTime aTrackOffset,
-                                        uint32_t aTrackEvents,
-                                        const MediaSegment& aQueuedMedia) override;
+  void NotifyQueuedTrackChanges(MediaStreamGraph* aGraph, TrackID aID,
+                                StreamTime aTrackOffset,
+                                uint32_t aTrackEvents,
+                                const MediaSegment& aQueuedMedia) override;
   /**
   * Measure size of mRawSegment
   */
   size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
 
-  virtual void SetBitrate(const uint32_t aBitrate) override
+  void SetBitrate(const uint32_t aBitrate) override
   {
     mVideoBitrate = aBitrate;
   }
 protected:
   /**
    * Initialized the video encoder. In order to collect the value of width and
    * height of source frames, this initialization is delayed until we have
    * received the first valid video frame from MediaStreamGraph;
@@ -298,17 +298,17 @@ protected:
    */
   nsresult AppendVideoSegment(const VideoSegment& aSegment);
 
   /**
    * Tells the video track encoder that we've reached the end of source stream,
    * and wakes up mReentrantMonitor if encoder is waiting for more track data.
    * Called on the MediaStreamGraph thread.
    */
-  virtual void NotifyEndOfStream() override;
+  void NotifyEndOfStream() override;
 
   /**
    * The width of source video frame, ceiled if the source width is odd.
    */
   int mFrameWidth;
 
   /**
    * The height of source video frame, ceiled if the source height is odd.
--- a/dom/media/gtest/MockMediaDecoderOwner.h
+++ b/dom/media/gtest/MockMediaDecoderOwner.h
@@ -8,46 +8,46 @@
 #include "MediaDecoderOwner.h"
 
 namespace mozilla
 {
 
 class MockMediaDecoderOwner : public MediaDecoderOwner
 {
 public:
-  virtual nsresult DispatchAsyncEvent(const nsAString& aName) override
+  nsresult DispatchAsyncEvent(const nsAString& aName) override
   {
     return NS_OK;
   }
-  virtual void FireTimeUpdate(bool aPeriodic) override {}
-  virtual bool GetPaused() override { return false; }
-  virtual void MetadataLoaded(const MediaInfo* aInfo,
-                              nsAutoPtr<const MetadataTags> aTags) override
+  void FireTimeUpdate(bool aPeriodic) override {}
+  bool GetPaused() override { return false; }
+  void MetadataLoaded(const MediaInfo* aInfo,
+                      nsAutoPtr<const MetadataTags> aTags) override
   {
   }
-  virtual void NetworkError() override {}
-  virtual void DecodeError() override {}
-  virtual void LoadAborted() override {}
-  virtual void PlaybackEnded() override {}
-  virtual void SeekStarted() override {}
-  virtual void SeekCompleted() override {}
-  virtual void DownloadProgressed() override {}
-  virtual void UpdateReadyState() override {}
-  virtual void FirstFrameLoaded() override {}
+  void NetworkError() override {}
+  void DecodeError() override {}
+  void LoadAborted() override {}
+  void PlaybackEnded() override {}
+  void SeekStarted() override {}
+  void SeekCompleted() override {}
+  void DownloadProgressed() override {}
+  void UpdateReadyState() override {}
+  void FirstFrameLoaded() override {}
 #ifdef MOZ_EME
-  virtual void DispatchEncrypted(const nsTArray<uint8_t>& aInitData,
-                                 const nsAString& aInitDataType) override {}
+  void DispatchEncrypted(const nsTArray<uint8_t>& aInitData,
+                         const nsAString& aInitDataType) override {}
 #endif // MOZ_EME
-  virtual bool IsActive() const override { return true; }
-  virtual bool IsHidden() const override { return false; }
-  virtual void DownloadSuspended() override {}
-  virtual void DownloadResumed(bool aForceNetworkLoading) override {}
-  virtual void NotifySuspendedByCache(bool aIsSuspended) override {}
-  virtual void NotifyDecoderPrincipalChanged() override {}
-  virtual VideoFrameContainer* GetVideoFrameContainer() override
+  bool IsActive() const override { return true; }
+  bool IsHidden() const override { return false; }
+  void DownloadSuspended() override {}
+  void DownloadResumed(bool aForceNetworkLoading) override {}
+  void NotifySuspendedByCache(bool aIsSuspended) override {}
+  void NotifyDecoderPrincipalChanged() override {}
+  VideoFrameContainer* GetVideoFrameContainer() override
   {
     return nullptr;
   }
-  virtual void ResetConnectionState() override {}
+  void ResetConnectionState() override {}
 };
 }
 
 #endif
--- a/dom/media/gtest/MockMediaResource.h
+++ b/dom/media/gtest/MockMediaResource.h
@@ -11,61 +11,60 @@
 
 namespace mozilla
 {
 
 class MockMediaResource : public MediaResource
 {
 public:
   explicit MockMediaResource(const char* aFileName);
-  virtual nsIURI* URI() const override { return nullptr; }
-  virtual nsresult Close() override { return NS_OK; }
-  virtual void Suspend(bool aCloseImmediately) override {}
-  virtual void Resume() override {}
-  virtual already_AddRefed<nsIPrincipal> GetCurrentPrincipal() override
+  nsIURI* URI() const override { return nullptr; }
+  nsresult Close() override { return NS_OK; }
+  void Suspend(bool aCloseImmediately) override {}
+  void Resume() override {}
+  already_AddRefed<nsIPrincipal> GetCurrentPrincipal() override
   {
     return nullptr;
   }
-  virtual bool CanClone() override { return false; }
-  virtual already_AddRefed<MediaResource> CloneData(MediaResourceCallback*)
+  bool CanClone() override { return false; }
+  already_AddRefed<MediaResource> CloneData(MediaResourceCallback*)
     override
   {
     return nullptr;
   }
-  virtual void SetReadMode(MediaCacheStream::ReadMode aMode) override {}
-  virtual void SetPlaybackRate(uint32_t aBytesPerSecond) override {}
-  virtual nsresult ReadAt(int64_t aOffset, char* aBuffer, uint32_t aCount,
-                          uint32_t* aBytes) override;
-  virtual int64_t Tell() override { return 0; }
-  virtual void Pin() override {}
-  virtual void Unpin() override {}
-  virtual double GetDownloadRate(bool* aIsReliable) override { return 0; }
-  virtual int64_t GetLength() override;
-  virtual int64_t GetNextCachedData(int64_t aOffset) override;
-  virtual int64_t GetCachedDataEnd(int64_t aOffset) override;
-  virtual bool IsDataCachedToEndOfResource(int64_t aOffset) override
+  void SetReadMode(MediaCacheStream::ReadMode aMode) override {}
+  void SetPlaybackRate(uint32_t aBytesPerSecond) override {}
+  nsresult ReadAt(int64_t aOffset, char* aBuffer, uint32_t aCount,
+                  uint32_t* aBytes) override;
+  int64_t Tell() override { return 0; }
+  void Pin() override {}
+  void Unpin() override {}
+  double GetDownloadRate(bool* aIsReliable) override { return 0; }
+  int64_t GetLength() override;
+  int64_t GetNextCachedData(int64_t aOffset) override;
+  int64_t GetCachedDataEnd(int64_t aOffset) override;
+  bool IsDataCachedToEndOfResource(int64_t aOffset) override
   {
     return false;
   }
-  virtual bool IsSuspendedByCache() override { return false; }
-  virtual bool IsSuspended() override { return false; }
-  virtual nsresult ReadFromCache(char* aBuffer, int64_t aOffset,
-                                 uint32_t aCount) override
+  bool IsSuspendedByCache() override { return false; }
+  bool IsSuspended() override { return false; }
+  nsresult ReadFromCache(char* aBuffer, int64_t aOffset,
+                         uint32_t aCount) override
   {
     uint32_t bytesRead = 0;
     nsresult rv = ReadAt(aOffset, aBuffer, aCount, &bytesRead);
     NS_ENSURE_SUCCESS(rv, rv);
     return bytesRead == aCount ? NS_OK : NS_ERROR_FAILURE;
   }
 
-  virtual bool IsTransportSeekable() override { return true; }
-  virtual nsresult Open(nsIStreamListener** aStreamListener) override;
-  virtual nsresult GetCachedRanges(MediaByteRangeSet& aRanges)
-    override;
-  virtual const nsCString& GetContentType() const override
+  bool IsTransportSeekable() override { return true; }
+  nsresult Open(nsIStreamListener** aStreamListener) override;
+  nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override;
+  const nsCString& GetContentType() const override
   {
     return mContentType;
   }
 
   void MockClearBufferedRanges();
   void MockAddBufferedRange(int64_t aStart, int64_t aEnd);
 
 protected:
--- a/dom/media/gtest/TestAudioCompactor.cpp
+++ b/dom/media/gtest/TestAudioCompactor.cpp
@@ -13,17 +13,17 @@ using mozilla::AudioDataValue;
 using mozilla::MediaDecoderReader;
 using mozilla::MediaQueue;
 
 class MemoryFunctor : public nsDequeFunctor {
 public:
   MemoryFunctor() : mSize(0) {}
   MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf);
 
-  virtual void* operator()(void* aObject) {
+  void* operator()(void* aObject) override {
     const AudioData* audioData = static_cast<const AudioData*>(aObject);
     mSize += audioData->SizeOfIncludingThis(MallocSizeOf);
     return nullptr;
   }
 
   size_t mSize;
 };
 
--- a/dom/media/gtest/TestGMPCrossOrigin.cpp
+++ b/dom/media/gtest/TestGMPCrossOrigin.cpp
@@ -48,17 +48,17 @@ private:
 
 template<class T, class Base,
          nsresult (NS_STDCALL GeckoMediaPluginService::*Getter)(nsTArray<nsCString>*,
                                                                 const nsACString&,
                                                                 UniquePtr<Base>&&)>
 class RunTestGMPVideoCodec : public Base
 {
 public:
-  virtual void Done(T* aGMP, GMPVideoHost* aHost)
+  void Done(T* aGMP, GMPVideoHost* aHost) override
   {
     EXPECT_TRUE(aGMP);
     EXPECT_TRUE(aHost);
     if (aGMP) {
       aGMP->Close();
     }
     mMonitor.SetFinished();
   }
@@ -119,17 +119,17 @@ GMPTestRunner::RunTestGMPTestCodec3(GMPT
 {
   RunTestGMPVideoEncoder::Run(aMonitor, NS_LITERAL_CSTRING(""));
 }
 
 template<class Base>
 class RunTestGMPCrossOrigin : public Base
 {
 public:
-  virtual void Done(typename Base::GMPCodecType* aGMP, GMPVideoHost* aHost)
+  void Done(typename Base::GMPCodecType* aGMP, GMPVideoHost* aHost) override
   {
     EXPECT_TRUE(aGMP);
 
     UniquePtr<typename Base::GMPCallbackType> callback(
       new Step2(Base::mMonitor, aGMP, mShouldBeEqual));
     nsresult rv = Base::Get(mOrigin2, Move(callback));
     EXPECT_TRUE(NS_SUCCEEDED(rv));
     if (NS_FAILED(rv)) {
@@ -165,17 +165,17 @@ private:
     Step2(GMPTestMonitor& aMonitor,
           typename Base::GMPCodecType* aGMP,
           bool aShouldBeEqual)
       : Base(aMonitor),
         mGMP(aGMP),
         mShouldBeEqual(aShouldBeEqual)
     {
     }
-    virtual void Done(typename Base::GMPCodecType* aGMP, GMPVideoHost* aHost)
+    void Done(typename Base::GMPCodecType* aGMP, GMPVideoHost* aHost) override
     {
       EXPECT_TRUE(aGMP);
       if (aGMP) {
         EXPECT_TRUE(mGMP &&
                     (mGMP->GetPluginId() == aGMP->GetPluginId()) == mShouldBeEqual);
       }
       if (mGMP) {
         mGMP->Close();
@@ -590,17 +590,17 @@ class GMPStorageTest : public GMPDecrypt
   {
   public:
     CreateDecryptorDone(GMPStorageTest* aRunner, nsIRunnable* aContinuation)
       : mRunner(aRunner),
         mContinuation(aContinuation)
     {
     }
 
-    virtual void Done(GMPDecryptorProxy* aDecryptor) override
+    void Done(GMPDecryptorProxy* aDecryptor) override
     {
       mRunner->mDecryptor = aDecryptor;
       EXPECT_TRUE(!!mRunner->mDecryptor);
 
       if (mRunner->mDecryptor) {
         mRunner->mDecryptor->Init(mRunner);
       }
       nsCOMPtr<nsIThread> thread(GetGMPThread());
@@ -1307,58 +1307,58 @@ class GMPStorageTest : public GMPDecrypt
   }
 
   void SetFinished() {
     mFinished = true;
     Shutdown();
     NS_DispatchToMainThread(NS_NewRunnableMethod(this, &GMPStorageTest::Dummy));
   }
 
-  virtual void SessionMessage(const nsCString& aSessionId,
-                              GMPSessionMessageType aMessageType,
-                              const nsTArray<uint8_t>& aMessage) override
+  void SessionMessage(const nsCString& aSessionId,
+                      GMPSessionMessageType aMessageType,
+                      const nsTArray<uint8_t>& aMessage) override
   {
     MonitorAutoLock mon(mMonitor);
 
     nsCString msg((const char*)aMessage.Elements(), aMessage.Length());
     EXPECT_TRUE(mExpected.Length() > 0);
     bool matches = mExpected[0].mMessage.Equals(msg);
     EXPECT_STREQ(mExpected[0].mMessage.get(), msg.get());
     if (mExpected.Length() > 0 && matches) {
       nsCOMPtr<nsIRunnable> continuation = mExpected[0].mContinuation;
       mExpected.RemoveElementAt(0);
       if (continuation) {
         NS_DispatchToCurrentThread(continuation);
       }
     }
   }
 
-  virtual void SetSessionId(uint32_t aCreateSessionToken,
-                            const nsCString& aSessionId) override { }
-  virtual void ResolveLoadSessionPromise(uint32_t aPromiseId,
-                                         bool aSuccess) override {}
-  virtual void ResolvePromise(uint32_t aPromiseId) override {}
-  virtual void RejectPromise(uint32_t aPromiseId,
-                             nsresult aException,
-                             const nsCString& aSessionId) override { }
-  virtual void ExpirationChange(const nsCString& aSessionId,
-                                GMPTimestamp aExpiryTime) override {}
-  virtual void SessionClosed(const nsCString& aSessionId) override {}
-  virtual void SessionError(const nsCString& aSessionId,
-                            nsresult aException,
-                            uint32_t aSystemCode,
-                            const nsCString& aMessage) override {}
-  virtual void KeyStatusChanged(const nsCString& aSessionId,
-                                const nsTArray<uint8_t>& aKeyId,
-                                GMPMediaKeyStatus aStatus) override { }
-  virtual void SetCaps(uint64_t aCaps) override {}
-  virtual void Decrypted(uint32_t aId,
-                         GMPErr aResult,
-                         const nsTArray<uint8_t>& aDecryptedData) override { }
-  virtual void Terminated() override {
+  void SetSessionId(uint32_t aCreateSessionToken,
+                    const nsCString& aSessionId) override { }
+  void ResolveLoadSessionPromise(uint32_t aPromiseId,
+                                 bool aSuccess) override {}
+  void ResolvePromise(uint32_t aPromiseId) override {}
+  void RejectPromise(uint32_t aPromiseId,
+                     nsresult aException,
+                     const nsCString& aSessionId) override { }
+  void ExpirationChange(const nsCString& aSessionId,
+                        GMPTimestamp aExpiryTime) override {}
+  void SessionClosed(const nsCString& aSessionId) override {}
+  void SessionError(const nsCString& aSessionId,
+                    nsresult aException,
+                    uint32_t aSystemCode,
+                    const nsCString& aMessage) override {}
+  void KeyStatusChanged(const nsCString& aSessionId,
+                        const nsTArray<uint8_t>& aKeyId,
+                        GMPMediaKeyStatus aStatus) override { }
+  void SetCaps(uint64_t aCaps) override {}
+  void Decrypted(uint32_t aId,
+                 GMPErr aResult,
+                 const nsTArray<uint8_t>& aDecryptedData) override { }
+  void Terminated() override {
     if (mDecryptor) {
       mDecryptor->Close();
       mDecryptor = nullptr;
     }
   }
 
 private:
   ~GMPStorageTest() { }
--- a/dom/media/imagecapture/CaptureTask.h
+++ b/dom/media/imagecapture/CaptureTask.h
@@ -27,28 +27,28 @@ class ImageCapture;
  * CaptureTask holds a reference of ImageCapture to ensure ImageCapture won't be
  * released during the period of the capturing process described above.
  */
 class CaptureTask : public MediaStreamListener,
                     public DOMMediaStream::PrincipalChangeObserver
 {
 public:
   // MediaStreamListener methods.
-  virtual void NotifyQueuedTrackChanges(MediaStreamGraph* aGraph, TrackID aID,
-                                        StreamTime aTrackOffset,
-                                        uint32_t aTrackEvents,
-                                        const MediaSegment& aQueuedMedia,
-                                        MediaStream* aInputStream,
-                                        TrackID aInputTrackID) override;
+  void NotifyQueuedTrackChanges(MediaStreamGraph* aGraph, TrackID aID,
+                                StreamTime aTrackOffset,
+                                uint32_t aTrackEvents,
+                                const MediaSegment& aQueuedMedia,
+                                MediaStream* aInputStream,
+                                TrackID aInputTrackID) override;
 
-  virtual void NotifyEvent(MediaStreamGraph* aGraph,
-                           MediaStreamGraphEvent aEvent) override;
+  void NotifyEvent(MediaStreamGraph* aGraph,
+                   MediaStreamGraphEvent aEvent) override;
 
   // DOMMediaStream::PrincipalChangeObserver method.
-  virtual void PrincipalChanged(DOMMediaStream* aMediaStream) override;
+  void PrincipalChanged(DOMMediaStream* aMediaStream) override;
 
   // CaptureTask methods.
 
   // It is called when aBlob is ready to post back to script in company with
   // aRv == NS_OK. If aRv is not NS_OK, it will post an error event to script.
   //
   // Note:
   //   this function should be called on main thread.
--- a/dom/media/imagecapture/ImageCapture.h
+++ b/dom/media/imagecapture/ImageCapture.h
@@ -48,17 +48,17 @@ public:
 
   // WebIDL members.
   void TakePhoto(ErrorResult& aResult);
 
   // The MediaStream passed into the constructor.
   VideoStreamTrack* GetVideoStreamTrack() const;
 
   // nsWrapperCache member
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
   {
     return ImageCaptureBinding::Wrap(aCx, this, aGivenProto);
   }
 
   // ImageCapture class members
   nsPIDOMWindow* GetParentObject() { return GetOwner(); }
 
   static already_AddRefed<ImageCapture> Constructor(const GlobalObject& aGlobal,
--- a/dom/media/systemservices/LoadManager.h
+++ b/dom/media/systemservices/LoadManager.h
@@ -28,25 +28,25 @@ class LoadManagerSingleton : public Load
 {
 public:
     static LoadManagerSingleton* Get();
 
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIOBSERVER
 
     // LoadNotificationCallback interface
-    virtual void LoadChanged(float aSystemLoad, float aProcessLoad) override;
+    void LoadChanged(float aSystemLoad, float aProcessLoad) override;
     // CpuOveruseObserver interface
     // Called as soon as an overuse is detected.
-    virtual void OveruseDetected() override;
+    void OveruseDetected() override;
     // Called periodically when the system is not overused any longer.
-    virtual void NormalUsage() override;
+    void NormalUsage() override;
     // CPULoadStateCallbackInvoker interface
-    virtual void AddObserver(webrtc::CPULoadStateObserver * aObserver) override;
-    virtual void RemoveObserver(webrtc::CPULoadStateObserver * aObserver) override;
+    void AddObserver(webrtc::CPULoadStateObserver * aObserver) override;
+    void RemoveObserver(webrtc::CPULoadStateObserver * aObserver) override;
 
 private:
     LoadManagerSingleton(int aLoadMeasurementInterval,
                          int aAveragingMeasurements,
                          float aHighLoadThreshold,
                          float aLowLoadThreshold);
     ~LoadManagerSingleton();