Bug 1118613 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/media; r=kinetik
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 06 Jan 2015 23:52:18 -0500
changeset 222573 11a25a9c085025371c2afd6ed869738d66698ad7
parent 222572 b30f55f7f94cf1c3f1be50e90d90c9fa79c2145c
child 222574 18557b56adbeb090e628ef48261da6d98425bc8a
push id28068
push usercbook@mozilla.com
push dateThu, 08 Jan 2015 13:16:34 +0000
treeherdermozilla-central@2880e05d5e32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs1118613
milestone37.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 1118613 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/media; r=kinetik
dom/media/gtest/MockMediaResource.h
dom/media/webrtc/MediaEngineTabVideoSource.h
dom/media/webspeech/synth/ipc/SpeechSynthesisChild.h
dom/media/webspeech/synth/nsSpeechTask.cpp
--- a/dom/media/gtest/MockMediaResource.h
+++ b/dom/media/gtest/MockMediaResource.h
@@ -33,17 +33,17 @@ public:
   virtual void SetReadMode(MediaCacheStream::ReadMode aMode) MOZ_OVERRIDE {}
   virtual void SetPlaybackRate(uint32_t aBytesPerSecond) MOZ_OVERRIDE {}
   virtual nsresult Read(char* aBuffer, uint32_t aCount, uint32_t* aBytes)
     MOZ_OVERRIDE
   {
     return NS_OK;
   }
   virtual nsresult ReadAt(int64_t aOffset, char* aBuffer, uint32_t aCount,
-                          uint32_t* aBytes);
+                          uint32_t* aBytes) MOZ_OVERRIDE;
   virtual nsresult Seek(int32_t aWhence, int64_t aOffset) MOZ_OVERRIDE
   {
     return NS_OK;
   }
   virtual int64_t Tell() MOZ_OVERRIDE { return 0; }
   virtual void Pin() MOZ_OVERRIDE {}
   virtual void Unpin() MOZ_OVERRIDE {}
   virtual double GetDownloadRate(bool* aIsReliable) MOZ_OVERRIDE { return 0; }
@@ -52,17 +52,17 @@ public:
   virtual int64_t GetCachedDataEnd(int64_t aOffset) MOZ_OVERRIDE;
   virtual bool IsDataCachedToEndOfResource(int64_t aOffset) MOZ_OVERRIDE
   {
     return false;
   }
   virtual bool IsSuspendedByCache() MOZ_OVERRIDE { return false; }
   virtual bool IsSuspended() MOZ_OVERRIDE { return false; }
   virtual nsresult ReadFromCache(char* aBuffer, int64_t aOffset,
-                                 uint32_t aCount)
+                                 uint32_t aCount) MOZ_OVERRIDE
   {
     return NS_OK;
   }
   virtual bool IsTransportSeekable() MOZ_OVERRIDE { return true; }
   virtual nsresult Open(nsIStreamListener** aStreamListener) MOZ_OVERRIDE;
   virtual nsresult GetCachedRanges(nsTArray<MediaByteRange>& aRanges)
     MOZ_OVERRIDE;
   virtual const nsCString& GetContentType() const MOZ_OVERRIDE
--- a/dom/media/webrtc/MediaEngineTabVideoSource.h
+++ b/dom/media/webrtc/MediaEngineTabVideoSource.h
@@ -13,37 +13,37 @@ namespace mozilla {
 
 class MediaEngineTabVideoSource : public MediaEngineVideoSource, nsIDOMEventListener, nsITimerCallback {
   public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIDOMEVENTLISTENER
     NS_DECL_NSITIMERCALLBACK
     MediaEngineTabVideoSource();
 
-    virtual void GetName(nsAString_internal&);
-    virtual void GetUUID(nsAString_internal&);
+    virtual void GetName(nsAString_internal&) MOZ_OVERRIDE;
+    virtual void GetUUID(nsAString_internal&) MOZ_OVERRIDE;
     virtual nsresult Allocate(const VideoTrackConstraintsN &,
-                              const mozilla::MediaEnginePrefs&);
-    virtual nsresult Deallocate();
-    virtual nsresult Start(mozilla::SourceMediaStream*, mozilla::TrackID);
-    virtual void SetDirectListeners(bool aHasDirectListeners) {};
+                              const mozilla::MediaEnginePrefs&) MOZ_OVERRIDE;
+    virtual nsresult Deallocate() MOZ_OVERRIDE;
+    virtual nsresult Start(mozilla::SourceMediaStream*, mozilla::TrackID) MOZ_OVERRIDE;
+    virtual void SetDirectListeners(bool aHasDirectListeners) MOZ_OVERRIDE {};
     virtual void NotifyPull(mozilla::MediaStreamGraph*, mozilla::SourceMediaStream*, mozilla::TrackID, mozilla::StreamTime) MOZ_OVERRIDE;
-    virtual nsresult Stop(mozilla::SourceMediaStream*, mozilla::TrackID);
-    virtual nsresult Config(bool, uint32_t, bool, uint32_t, bool, uint32_t, int32_t);
-    virtual bool IsFake();
-    virtual const MediaSourceType GetMediaSource() {
+    virtual nsresult Stop(mozilla::SourceMediaStream*, mozilla::TrackID) MOZ_OVERRIDE;
+    virtual nsresult Config(bool, uint32_t, bool, uint32_t, bool, uint32_t, int32_t) MOZ_OVERRIDE;
+    virtual bool IsFake() MOZ_OVERRIDE;
+    virtual const MediaSourceType GetMediaSource() MOZ_OVERRIDE {
       return MediaSourceType::Browser;
     }
     virtual bool SatisfiesConstraintSets(
-      const nsTArray<const dom::MediaTrackConstraintSet*>& aConstraintSets)
+      const nsTArray<const dom::MediaTrackConstraintSet*>& aConstraintSets) MOZ_OVERRIDE
     {
       return true;
     }
 
-    virtual nsresult TakePhoto(PhotoCallback* aCallback)
+    virtual nsresult TakePhoto(PhotoCallback* aCallback) MOZ_OVERRIDE
     {
       return NS_ERROR_NOT_IMPLEMENTED;
     }
 
     void Draw();
 
     class StartRunnable : public nsRunnable {
     public:
--- a/dom/media/webspeech/synth/ipc/SpeechSynthesisChild.h
+++ b/dom/media/webspeech/synth/ipc/SpeechSynthesisChild.h
@@ -77,21 +77,21 @@ public:
   NS_IMETHOD Setup(nsISpeechTaskCallback* aCallback,
                    uint32_t aChannels, uint32_t aRate, uint8_t argc) MOZ_OVERRIDE;
 
   NS_IMETHOD SendAudio(JS::Handle<JS::Value> aData, JS::Handle<JS::Value> aLandmarks,
                        JSContext* aCx) MOZ_OVERRIDE;
 
   NS_IMETHOD SendAudioNative(int16_t* aData, uint32_t aDataLen) MOZ_OVERRIDE;
 
-  virtual void Pause();
+  virtual void Pause() MOZ_OVERRIDE;
 
-  virtual void Resume();
+  virtual void Resume() MOZ_OVERRIDE;
 
-  virtual void Cancel();
+  virtual void Cancel() MOZ_OVERRIDE;
 
 private:
   SpeechSynthesisRequestChild* mActor;
 };
 
 } // namespace dom
 } // namespace mozilla
 
--- a/dom/media/webspeech/synth/nsSpeechTask.cpp
+++ b/dom/media/webspeech/synth/nsSpeechTask.cpp
@@ -63,17 +63,17 @@ public:
       case EVENT_REMOVED:
         mSpeechTask = nullptr;
         break;
       default:
         break;
     }
   }
 
-  virtual void NotifyBlockingChanged(MediaStreamGraph* aGraph, Blocking aBlocked)
+  virtual void NotifyBlockingChanged(MediaStreamGraph* aGraph, Blocking aBlocked) MOZ_OVERRIDE
   {
     if (aBlocked == MediaStreamListener::UNBLOCKED && !mStarted) {
       mStarted = true;
       nsCOMPtr<nsIRunnable> event =
         NS_NewRunnableMethod(this, &SynthStreamListener::DoNotifyStarted);
       aGraph->DispatchToMainThreadAfterStreamStateUpdate(event.forget());
     }
   }