Bug 1118803 - Mark virtual overridden functions as MOZ_OVERRIDE in misc DOM code; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 07 Jan 2015 12:00:44 -0500
changeset 235699 238eeecce596d5158217b64a5ddda4a96918a66b
parent 235698 b8d51d20fd97aca487d04b7bf0f57cf31c954e4e
child 235700 470bc082ec71f90bb1a5cff5c874db14ce95563e
push id370
push userbsmedberg@mozilla.com
push dateThu, 08 Jan 2015 17:37:37 +0000
reviewersbaku
bugs1118803
milestone37.0a1
Bug 1118803 - Mark virtual overridden functions as MOZ_OVERRIDE in misc DOM code; r=baku
dom/alarm/AlarmHalService.h
dom/battery/BatteryManager.h
dom/camera/FallbackCameraControl.cpp
dom/cellbroadcast/ipc/CellBroadcastParent.h
dom/crypto/CryptoKey.h
dom/crypto/WebCryptoTask.cpp
dom/devicestorage/nsDeviceStorage.cpp
dom/geolocation/nsGeolocation.cpp
dom/indexedDB/ActorsParent.cpp
dom/mobileconnection/ipc/MobileConnectionParent.h
dom/mobilemessage/ipc/SmsParent.h
dom/network/Connection.h
dom/network/TCPSocketParent.h
dom/notification/DesktopNotification.h
dom/notification/Notification.cpp
dom/power/PowerManagerService.h
dom/quota/QuotaManager.cpp
dom/system/nsDeviceSensors.h
dom/telephony/ipc/TelephonyParent.h
dom/time/TimeManager.h
dom/tv/FakeTVService.cpp
--- a/dom/alarm/AlarmHalService.h
+++ b/dom/alarm/AlarmHalService.h
@@ -29,20 +29,20 @@ public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIALARMHALSERVICE
 
   void Init();
 
   static already_AddRefed<AlarmHalService> GetInstance();
 
   // Implementing hal::AlarmObserver
-  void Notify(const void_t& aVoid);
+  void Notify(const void_t& aVoid) MOZ_OVERRIDE;
 
   // Implementing hal::SystemTimezoneChangeObserver
-  void Notify(const hal::SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo);
+  void Notify(const hal::SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo) MOZ_OVERRIDE;
 
 private:
   virtual ~AlarmHalService();
 
   bool mAlarmEnabled;
   static StaticRefPtr<AlarmHalService> sSingleton;
 
   nsCOMPtr<nsIAlarmFiredCb> mAlarmFiredCb;
--- a/dom/battery/BatteryManager.h
+++ b/dom/battery/BatteryManager.h
@@ -28,17 +28,17 @@ class BatteryManager : public DOMEventTa
 {
 public:
   explicit BatteryManager(nsPIDOMWindow* aWindow);
 
   void Init();
   void Shutdown();
 
   // For IObserver.
-  void Notify(const hal::BatteryInformation& aBatteryInfo);
+  void Notify(const hal::BatteryInformation& aBatteryInfo) MOZ_OVERRIDE;
 
   /**
    * WebIDL Interface
    */
 
   nsPIDOMWindow* GetParentObject() const
   {
      return GetOwner();
--- a/dom/camera/FallbackCameraControl.cpp
+++ b/dom/camera/FallbackCameraControl.cpp
@@ -49,25 +49,25 @@ public:
   virtual RecorderProfile* GetProfileInfo(const nsAString& aProfile) MOZ_OVERRIDE { return nullptr; }
 
   nsresult PushParameters() { return NS_ERROR_NOT_INITIALIZED; }
   nsresult PullParameters() { return NS_ERROR_NOT_INITIALIZED; }
 
 protected:
   ~FallbackCameraControl();
 
-  virtual nsresult StartPreviewImpl() { return NS_ERROR_NOT_INITIALIZED; }
-  virtual nsresult StopPreviewImpl() { return NS_ERROR_NOT_INITIALIZED; }
-  virtual nsresult AutoFocusImpl() { return NS_ERROR_NOT_INITIALIZED; }
-  virtual nsresult StartFaceDetectionImpl() { return NS_ERROR_NOT_INITIALIZED; }
-  virtual nsresult StopFaceDetectionImpl() { return NS_ERROR_NOT_INITIALIZED; }
-  virtual nsresult TakePictureImpl() { return NS_ERROR_NOT_INITIALIZED; }
+  virtual nsresult StartPreviewImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
+  virtual nsresult StopPreviewImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
+  virtual nsresult AutoFocusImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
+  virtual nsresult StartFaceDetectionImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
+  virtual nsresult StopFaceDetectionImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
+  virtual nsresult TakePictureImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
   virtual nsresult StartRecordingImpl(DeviceStorageFileDescriptor* aFileDescriptor,
                                       const StartRecordingOptions* aOptions = nullptr) MOZ_OVERRIDE
                                         { return NS_ERROR_NOT_INITIALIZED; }
-  virtual nsresult StopRecordingImpl() { return NS_ERROR_NOT_INITIALIZED; }
-  virtual nsresult PushParametersImpl() { return NS_ERROR_NOT_INITIALIZED; }
-  virtual nsresult PullParametersImpl() { return NS_ERROR_NOT_INITIALIZED; }
+  virtual nsresult StopRecordingImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
+  virtual nsresult PushParametersImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
+  virtual nsresult PullParametersImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
 
 private:
   FallbackCameraControl(const FallbackCameraControl&) MOZ_DELETE;
   FallbackCameraControl& operator=(const FallbackCameraControl&) MOZ_DELETE;
 };
--- a/dom/cellbroadcast/ipc/CellBroadcastParent.h
+++ b/dom/cellbroadcast/ipc/CellBroadcastParent.h
@@ -23,16 +23,16 @@ public:
   NS_DECL_NSICELLBROADCASTLISTENER
 
   bool Init();
 
 private:
   // MOZ_FINAL suppresses -Werror,-Wdelete-non-virtual-dtor
   ~CellBroadcastParent() {};
 
-  virtual void ActorDestroy(ActorDestroyReason aWhy);
+  virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
 };
 
 } // namespace cellbroadcast
 } // namespace dom
 } // namespace mozilla
 
-#endif // mozilla_dom_cellbroadcast_CellBroadcastParent_h
\ No newline at end of file
+#endif // mozilla_dom_cellbroadcast_CellBroadcastParent_h
--- a/dom/crypto/CryptoKey.h
+++ b/dom/crypto/CryptoKey.h
@@ -134,17 +134,17 @@ public:
   // Note: GetPrivateKey and GetPublicKey return copies of the internal
   // key handles, which the caller must free with SECKEY_DestroyPrivateKey
   // or SECKEY_DestroyPublicKey.
   const CryptoBuffer& GetSymKey() const;
   SECKEYPrivateKey* GetPrivateKey() const;
   SECKEYPublicKey* GetPublicKey() const;
 
   // For nsNSSShutDownObject
-  virtual void virtualDestroyNSSReference();
+  virtual void virtualDestroyNSSReference() MOZ_OVERRIDE;
   void destructorSafeDestroyNSSReference();
 
   // Serialization and deserialization convenience methods
   // Note:
   // 1. The inputs aKeyData are non-const only because the NSS import
   //    functions lack the const modifier.  They should not be modified.
   // 2. All of the NSS key objects returned need to be freed by the caller.
   static SECKEYPrivateKey* PrivateKeyFromPkcs8(CryptoBuffer& aKeyData,
--- a/dom/crypto/WebCryptoTask.cpp
+++ b/dom/crypto/WebCryptoTask.cpp
@@ -2099,22 +2099,24 @@ private:
 
     // This doesn't leak, because the SECItem* returned by PK11_GetKeyData
     // just refers to a buffer managed by symKey.  The assignment copies the
     // data, so mKeyData manages one copy, while symKey manages another.
     ATTEMPT_BUFFER_ASSIGN(mKeyData, PK11_GetKeyData(symKey));
     return NS_OK;
   }
 
-  virtual void Resolve() {
+  virtual void Resolve() MOZ_OVERRIDE
+  {
     mKey->SetSymKey(mKeyData);
     mResultPromise->MaybeResolve(mKey);
   }
 
-  virtual void Cleanup() {
+  virtual void Cleanup() MOZ_OVERRIDE
+  {
     mKey = nullptr;
   }
 };
 
 class GenerateAsymmetricKeyTask : public WebCryptoTask
 {
 public:
   GenerateAsymmetricKeyTask(JSContext* aCx,
@@ -2739,17 +2741,18 @@ private:
 
       NS_ConvertUTF16toUTF8 utf8(json);
       mResult.Assign((const uint8_t*) utf8.BeginReading(), utf8.Length());
     }
 
     return NS_OK;
   }
 
-  virtual void Resolve() MOZ_OVERRIDE {
+  virtual void Resolve() MOZ_OVERRIDE
+  {
     mTask->SetData(mResult);
     mTask->DispatchWithPromise(mResultPromise);
     mResolved = true;
   }
 
   virtual void Cleanup() MOZ_OVERRIDE
   {
     if (mTask && !mResolved) {
@@ -2772,17 +2775,18 @@ public:
     , mTask(aTask)
     , mResolved(false)
   {}
 
 private:
   nsRefPtr<ImportKeyTask> mTask;
   bool mResolved;
 
-  virtual void Resolve() MOZ_OVERRIDE {
+  virtual void Resolve() MOZ_OVERRIDE
+  {
     mTask->SetKeyData(KeyEncryptTask::mResult);
     mTask->DispatchWithPromise(KeyEncryptTask::mResultPromise);
     mResolved = true;
   }
 
   virtual void Cleanup() MOZ_OVERRIDE
   {
     if (mTask && !mResolved) {
--- a/dom/devicestorage/nsDeviceStorage.cpp
+++ b/dom/devicestorage/nsDeviceStorage.cpp
@@ -2197,31 +2197,31 @@ nsDOMDeviceStorageCursor::GetTypes(nsIAr
   nsTArray<nsString> emptyOptions;
   return nsContentPermissionUtils::CreatePermissionArray(type,
                                                          NS_LITERAL_CSTRING("read"),
                                                          emptyOptions,
                                                          aTypes);
 }
 
 NS_IMETHODIMP
-nsDOMDeviceStorageCursor::GetPrincipal(nsIPrincipal * *aRequestingPrincipal)
+nsDOMDeviceStorageCursor::GetPrincipal(nsIPrincipal** aRequestingPrincipal)
 {
   NS_IF_ADDREF(*aRequestingPrincipal = mPrincipal);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDOMDeviceStorageCursor::GetWindow(nsIDOMWindow * *aRequestingWindow)
+nsDOMDeviceStorageCursor::GetWindow(nsIDOMWindow** aRequestingWindow)
 {
   NS_IF_ADDREF(*aRequestingWindow = GetOwner());
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDOMDeviceStorageCursor::GetElement(nsIDOMElement * *aRequestingElement)
+nsDOMDeviceStorageCursor::GetElement(nsIDOMElement** aRequestingElement)
 {
   *aRequestingElement = nullptr;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDOMDeviceStorageCursor::Cancel()
 {
@@ -2895,29 +2895,29 @@ public:
     MOZ_ASSERT(mRequest);
     MOZ_ASSERT(mDSFileDescriptor);
   }
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(DeviceStorageRequest,
                                            nsIContentPermissionRequest)
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     if (mozilla::Preferences::GetBool("device.storage.prompt.testing", false)) {
       Allow(JS::UndefinedHandleValue);
       return NS_OK;
     }
 
     return nsContentPermissionUtils::AskPermission(this, mWindow);
   }
 
-  NS_IMETHODIMP GetTypes(nsIArray** aTypes)
+  NS_IMETHODIMP GetTypes(nsIArray** aTypes) MOZ_OVERRIDE
   {
     nsCString type;
     nsresult rv =
       DeviceStorageTypeChecker::GetPermissionForType(mFile->mStorageType, type);
     if (NS_FAILED(rv)) {
       return rv;
     }
 
@@ -2927,43 +2927,43 @@ public:
     if (NS_FAILED(rv)) {
       return rv;
     }
 
     nsTArray<nsString> emptyOptions;
     return nsContentPermissionUtils::CreatePermissionArray(type, access, emptyOptions, aTypes);
   }
 
-  NS_IMETHOD GetPrincipal(nsIPrincipal * *aRequestingPrincipal)
+  NS_IMETHOD GetPrincipal(nsIPrincipal * *aRequestingPrincipal) MOZ_OVERRIDE
   {
     NS_IF_ADDREF(*aRequestingPrincipal = mPrincipal);
     return NS_OK;
   }
 
-  NS_IMETHOD GetWindow(nsIDOMWindow * *aRequestingWindow)
+  NS_IMETHOD GetWindow(nsIDOMWindow * *aRequestingWindow) MOZ_OVERRIDE
   {
     NS_IF_ADDREF(*aRequestingWindow = mWindow);
     return NS_OK;
   }
 
-  NS_IMETHOD GetElement(nsIDOMElement * *aRequestingElement)
+  NS_IMETHOD GetElement(nsIDOMElement * *aRequestingElement) MOZ_OVERRIDE
   {
     *aRequestingElement = nullptr;
     return NS_OK;
   }
 
-  NS_IMETHOD Cancel()
+  NS_IMETHOD Cancel() MOZ_OVERRIDE
   {
     nsCOMPtr<nsIRunnable> event
       = new PostErrorEvent(mRequest.forget(),
                            POST_ERROR_EVENT_PERMISSION_DENIED);
     return NS_DispatchToMainThread(event);
   }
 
-  NS_IMETHOD Allow(JS::HandleValue aChoices)
+  NS_IMETHOD Allow(JS::HandleValue aChoices) MOZ_OVERRIDE
   {
     MOZ_ASSERT(NS_IsMainThread());
     MOZ_ASSERT(aChoices.isUndefined());
 
     if (!mRequest) {
       return NS_ERROR_FAILURE;
     }
 
--- a/dom/geolocation/nsGeolocation.cpp
+++ b/dom/geolocation/nsGeolocation.cpp
@@ -128,17 +128,17 @@ class GeolocationSettingsCallback : publ
 
 public:
   NS_DECL_ISUPPORTS
 
   GeolocationSettingsCallback() {
     MOZ_COUNT_CTOR(GeolocationSettingsCallback);
   }
 
-  NS_IMETHOD Handle(const nsAString& aName, JS::Handle<JS::Value> aResult)
+  NS_IMETHOD Handle(const nsAString& aName, JS::Handle<JS::Value> aResult) MOZ_OVERRIDE
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     if (aName.EqualsASCII(GEO_SETTINGS_ENABLED)) {
       // The geolocation is enabled by default:
       bool value = true;
       if (aResult.isBoolean()) {
         value = aResult.toBoolean();
@@ -154,17 +154,17 @@ public:
       if (gs) {
         gs->HandleGeolocationSettingsChange(aName, aResult);
       }
     }
 
     return NS_OK;
   }
 
-  NS_IMETHOD HandleError(const nsAString& aName)
+  NS_IMETHOD HandleError(const nsAString& aName) MOZ_OVERRIDE
   {
     if (aName.EqualsASCII(GEO_SETTINGS_ENABLED)) {
       GPSLOG("Unable to get value for '" GEO_SETTINGS_ENABLED "'");
 
       // Default it's enabled:
       MozSettingValue(true);
     } else {
       nsRefPtr<nsGeolocationSettings> gs = nsGeolocationSettings::GetGeolocationSettings();
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -5205,17 +5205,17 @@ public:
     MOZ_ASSERT(NS_IsMainThread());
 
     return mShutdownRequested;
   }
 
   void
   NoteBackgroundThread(nsIEventTarget* aBackgroundThread);
 
-  NS_INLINE_DECL_REFCOUNTING(QuotaClient)
+  NS_INLINE_DECL_REFCOUNTING(QuotaClient, MOZ_OVERRIDE)
 
   virtual mozilla::dom::quota::Client::Type
   GetType() MOZ_OVERRIDE;
 
   virtual nsresult
   InitOrigin(PersistenceType aPersistenceType,
              const nsACString& aGroup,
              const nsACString& aOrigin,
--- a/dom/mobileconnection/ipc/MobileConnectionParent.h
+++ b/dom/mobileconnection/ipc/MobileConnectionParent.h
@@ -31,17 +31,17 @@ public:
 protected:
   virtual
   ~MobileConnectionParent()
   {
     MOZ_COUNT_DTOR(MobileConnectionParent);
   }
 
   virtual void
-  ActorDestroy(ActorDestroyReason why);
+  ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
 
   virtual bool
   RecvPMobileConnectionRequestConstructor(PMobileConnectionRequestParent* aActor,
                                           const MobileConnectionRequest& aRequest) MOZ_OVERRIDE;
 
   virtual PMobileConnectionRequestParent*
   AllocPMobileConnectionRequestParent(const MobileConnectionRequest& request) MOZ_OVERRIDE;
 
@@ -147,17 +147,17 @@ public:
 protected:
   virtual
   ~MobileConnectionRequestParent()
   {
     MOZ_COUNT_DTOR(MobileConnectionRequestParent);
   }
 
   virtual void
-  ActorDestroy(ActorDestroyReason why);
+  ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
 
   nsresult
   SendReply(const MobileConnectionReply& aReply);
 
 private:
   nsCOMPtr<nsIMobileConnection> mMobileConnection;
   bool mLive;
 };
--- a/dom/mobilemessage/ipc/SmsParent.h
+++ b/dom/mobilemessage/ipc/SmsParent.h
@@ -39,17 +39,17 @@ protected:
 
   SmsParent();
   virtual ~SmsParent()
   {
     MOZ_COUNT_DTOR(SmsParent);
   }
 
   virtual void
-  ActorDestroy(ActorDestroyReason why);
+  ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
 
   virtual bool
   RecvPSmsRequestConstructor(PSmsRequestParent* aActor,
                              const IPCSmsRequest& aRequest) MOZ_OVERRIDE;
 
   virtual PSmsRequestParent*
   AllocPSmsRequestParent(const IPCSmsRequest& aRequest) MOZ_OVERRIDE;
 
--- a/dom/network/Connection.h
+++ b/dom/network/Connection.h
@@ -32,17 +32,17 @@ public:
 
   NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
 
   explicit Connection(nsPIDOMWindow *aWindow);
 
   void Shutdown();
 
   // For IObserver
-  void Notify(const hal::NetworkInformation& aNetworkInfo);
+  void Notify(const hal::NetworkInformation& aNetworkInfo) MOZ_OVERRIDE;
 
   // WebIDL
 
   virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
 
   ConnectionType Type() const { return mType; }
 
   IMPL_EVENT_HANDLER(typechange)
--- a/dom/network/TCPSocketParent.h
+++ b/dom/network/TCPSocketParent.h
@@ -47,17 +47,17 @@ class TCPSocketParent : public mozilla::
 {
 public:
   NS_DECL_NSITCPSOCKETPARENT
   NS_IMETHOD_(MozExternalRefCountType) Release() MOZ_OVERRIDE;
 
   TCPSocketParent() {}
 
   virtual bool RecvOpen(const nsString& aHost, const uint16_t& aPort,
-                        const bool& useSSL, const nsString& aBinaryType);
+                        const bool& useSSL, const nsString& aBinaryType) MOZ_OVERRIDE;
 
   virtual bool RecvStartTLS() MOZ_OVERRIDE;
   virtual bool RecvSuspend() MOZ_OVERRIDE;
   virtual bool RecvResume() MOZ_OVERRIDE;
   virtual bool RecvClose() MOZ_OVERRIDE;
   virtual bool RecvData(const SendableData& aData,
                         const uint32_t& aTrackingNumber) MOZ_OVERRIDE;
   virtual bool RecvRequestDelete() MOZ_OVERRIDE;
--- a/dom/notification/DesktopNotification.h
+++ b/dom/notification/DesktopNotification.h
@@ -145,19 +145,19 @@ class AlertServiceObserver: public nsIOb
   NS_DECL_ISUPPORTS
 
   explicit AlertServiceObserver(DesktopNotification* notification)
     : mNotification(notification) {}
 
   void Disconnect() { mNotification = nullptr; }
 
   NS_IMETHODIMP
-  Observe(nsISupports *aSubject,
-          const char *aTopic,
-          const char16_t *aData)
+  Observe(nsISupports* aSubject,
+          const char* aTopic,
+          const char16_t* aData) MOZ_OVERRIDE
   {
 
     // forward to parent
     if (mNotification) {
 #ifdef MOZ_B2G
     if (NS_FAILED(mNotification->CheckInnerWindowCorrectness()))
       return NS_ERROR_NOT_AVAILABLE;
 #endif
--- a/dom/notification/Notification.cpp
+++ b/dom/notification/Notification.cpp
@@ -59,17 +59,17 @@ public:
                     const nsAString& aTitle,
                     const nsAString& aDir,
                     const nsAString& aLang,
                     const nsAString& aBody,
                     const nsAString& aTag,
                     const nsAString& aIcon,
                     const nsAString& aData,
                     const nsAString& aBehavior,
-                    JSContext* aCx)
+                    JSContext* aCx) MOZ_OVERRIDE
   {
     MOZ_ASSERT(!aID.IsEmpty());
 
     RootedDictionary<NotificationOptions> options(aCx);
     options.mDir = Notification::StringToDirection(nsString(aDir));
     options.mLang = aLang;
     options.mBody = aBody;
     options.mTag = aTag;
@@ -94,17 +94,17 @@ public:
 
     JS::Rooted<JSObject*> notifications(aCx, mNotifications);
     if (!JS_DefineElement(aCx, notifications, mCount++, element, 0)) {
       return NS_ERROR_FAILURE;
     }
     return NS_OK;
   }
 
-  NS_IMETHOD Done(JSContext* aCx)
+  NS_IMETHOD Done(JSContext* aCx) MOZ_OVERRIDE
   {
     JSAutoCompartment ac(aCx, mGlobal);
     JS::Rooted<JS::Value> result(aCx, JS::ObjectValue(*mNotifications));
     mPromise->MaybeResolve(aCx, result);
     return NS_OK;
   }
 
 private:
--- a/dom/power/PowerManagerService.h
+++ b/dom/power/PowerManagerService.h
@@ -30,17 +30,17 @@ public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIPOWERMANAGERSERVICE
 
   static already_AddRefed<PowerManagerService> GetInstance();
 
   void Init();
 
   // Implement WakeLockObserver
-  void Notify(const hal::WakeLockInformation& aWakeLockInfo);
+  void Notify(const hal::WakeLockInformation& aWakeLockInfo) MOZ_OVERRIDE;
 
   /**
    * Acquire a wake lock on behalf of a given process (aContentParent).
    *
    * This method stands in contrast to nsIPowerManagerService::NewWakeLock,
    * which acquires a wake lock on behalf of the /current/ process.
    *
    * NewWakeLockOnBehalfOfProcess is different from NewWakeLock in that
--- a/dom/quota/QuotaManager.cpp
+++ b/dom/quota/QuotaManager.cpp
@@ -220,17 +220,17 @@ public:
   OriginClearRunnable(const OriginOrPatternString& aOriginOrPattern,
                       Nullable<PersistenceType> aPersistenceType)
   : mOriginOrPattern(aOriginOrPattern),
     mPersistenceType(aPersistenceType),
     mCallbackState(Pending)
   { }
 
   NS_IMETHOD
-  Run();
+  Run() MOZ_OVERRIDE;
 
   void
   AdvanceState()
   {
     switch (mCallbackState) {
       case Pending:
         mCallbackState = OpenAllowed;
         return;
@@ -294,17 +294,17 @@ public:
                      bool aInMozBrowserOnly,
                      const nsACString& aGroup,
                      const OriginOrPatternString& aOrigin,
                      bool aIsApp,
                      nsIURI* aURI,
                      nsIUsageCallback* aCallback);
 
   NS_IMETHOD
-  Run();
+  Run() MOZ_OVERRIDE;
 
   void
   AdvanceState()
   {
     switch (mCallbackState) {
       case Pending:
         mCallbackState = OpenAllowed;
         return;
@@ -364,17 +364,17 @@ public:
   NS_DECL_ISUPPORTS_INHERITED
 
   explicit ResetOrClearRunnable(bool aClear)
   : mCallbackState(Pending),
     mClear(aClear)
   { }
 
   NS_IMETHOD
-  Run();
+  Run() MOZ_OVERRIDE;
 
   void
   AdvanceState()
   {
     switch (mCallbackState) {
       case Pending:
         mCallbackState = OpenAllowed;
         return;
--- a/dom/system/nsDeviceSensors.h
+++ b/dom/system/nsDeviceSensors.h
@@ -28,17 +28,17 @@ class nsDeviceSensors : public nsIDevice
   typedef mozilla::dom::DeviceAccelerationInit DeviceAccelerationInit;
   typedef mozilla::dom::DeviceRotationRateInit DeviceRotationRateInit;
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDEVICESENSORS
 
   nsDeviceSensors();
 
-  void Notify(const mozilla::hal::SensorData& aSensorData);
+  void Notify(const mozilla::hal::SensorData& aSensorData) MOZ_OVERRIDE;
 
 private:
   virtual ~nsDeviceSensors();
 
   // sensor -> window listener
   nsTArray<nsTArray<nsIDOMWindow*>* > mWindowListeners;
 
   void FireDOMLightEvent(mozilla::dom::EventTarget* aTarget,
--- a/dom/telephony/ipc/TelephonyParent.h
+++ b/dom/telephony/ipc/TelephonyParent.h
@@ -21,17 +21,17 @@ public:
   NS_DECL_NSITELEPHONYLISTENER
 
   TelephonyParent();
 
 protected:
   virtual ~TelephonyParent() {}
 
   virtual void
-  ActorDestroy(ActorDestroyReason why);
+  ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
 
   virtual bool
   RecvPTelephonyRequestConstructor(PTelephonyRequestParent* aActor, const IPCTelephonyRequest& aRequest) MOZ_OVERRIDE;
 
   virtual PTelephonyRequestParent*
   AllocPTelephonyRequestParent(const IPCTelephonyRequest& aRequest) MOZ_OVERRIDE;
 
   virtual bool
@@ -93,17 +93,17 @@ public:
   NS_DECL_NSITELEPHONYCALLBACK
   NS_DECL_NSITELEPHONYDIALCALLBACK
 
 protected:
   TelephonyRequestParent();
   virtual ~TelephonyRequestParent() {}
 
   virtual void
-  ActorDestroy(ActorDestroyReason why);
+  ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
 
   nsresult
   SendResponse(const IPCTelephonyResponse& aResponse);
 
 private:
   bool mActorDestroyed;
 };
 
--- a/dom/time/TimeManager.h
+++ b/dom/time/TimeManager.h
@@ -37,17 +37,17 @@ public:
     : mWindow(aWindow)
   {
   }
 
   nsPIDOMWindow* GetParentObject() const
   {
     return mWindow;
   }
-  JSObject* WrapObject(JSContext* aCx);
+  virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
 
   void Set(Date& aDate);
   void Set(double aTime);
 
 private:
   ~TimeManager() {}
 
   nsCOMPtr<nsPIDOMWindow> mWindow;
--- a/dom/tv/FakeTVService.cpp
+++ b/dom/tv/FakeTVService.cpp
@@ -191,17 +191,17 @@ public:
                          nsITVChannelData* aChannelData)
     : mTunerId(aTunerId)
     , mSourceType(aSourceType)
     , mSourceListener(aSourceListener)
     , mChannelData(aChannelData)
   {}
 
   NS_IMETHODIMP
-  Notify(nsITimer* aTimer)
+  Notify(nsITimer* aTimer) MOZ_OVERRIDE
   {
     // Notify mock EIT broadcasting.
     nsITVProgramData** programDataList =
       static_cast<nsITVProgramData **>(NS_Alloc(1 * sizeof(nsITVProgramData*)));
     programDataList[0] = new TVProgramData();
     programDataList[0]->SetEventId(NS_LITERAL_STRING("eventId"));
     programDataList[0]->SetTitle(NS_LITERAL_STRING("title"));
     programDataList[0]->SetStartTime(PR_Now() + 3600000);
@@ -237,17 +237,17 @@ public:
                        const nsAString& aSourceType,
                        nsITVSourceListener* aSourceListener)
     : mTunerId(aTunerId)
     , mSourceType(aSourceType)
     , mSourceListener(aSourceListener)
   {}
 
   NS_IMETHODIMP
-  Notify(nsITimer* aTimer)
+  Notify(nsITimer* aTimer) MOZ_OVERRIDE
   {
     return mSourceListener->NotifyChannelScanComplete(mTunerId, mSourceType);
   }
 
 private:
   ~ScanCompleteCallback() {}
 
   nsString mTunerId;