Bug 877746 - Annotate ~230 methods with MOZ_OVERRIDE in /dom. r=Ms2ger
authorArnaud Sourioux <six.dsn@gmail.com>
Wed, 05 Jun 2013 12:15:48 -0400
changeset 134118 14bd2ec730ae12a758b1ff9551951cc745a5cc7e
parent 134117 8bb0927fe094e42a859864432bfc35de1e748ee2
child 134119 fe9dcdf485519c43f30b8de337b8eb54b3ebff1e
push id24783
push userryanvm@gmail.com
push dateWed, 05 Jun 2013 20:30:03 +0000
treeherdermozilla-central@204de5b7e0a6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
bugs877746
milestone24.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 877746 - Annotate ~230 methods with MOZ_OVERRIDE in /dom. r=Ms2ger
dom/base/nsDOMClassInfo.h
dom/base/nsDOMScriptObjectFactory.h
dom/base/nsJSEnvironment.h
dom/base/nsWindowRoot.h
dom/bluetooth/BluetoothAdapter.h
dom/bluetooth/BluetoothDevice.h
dom/bluetooth/BluetoothManager.h
dom/bluetooth/BluetoothReplyRunnable.h
dom/bluetooth/gonk/BluetoothGonkService.h
dom/bluetooth/linux/BluetoothDBusService.h
dom/camera/CameraControlImpl.h
dom/camera/DOMCameraManager.h
dom/devicestorage/DeviceStorageRequestParent.h
dom/devicestorage/nsDeviceStorage.h
dom/file/ArchiveRequest.h
dom/file/ArchiveZipEvent.h
dom/file/ArchiveZipFile.h
dom/file/DOMFileHandle.h
dom/file/File.h
dom/file/FileRequest.h
dom/file/FileService.h
dom/file/LockedFile.h
dom/file/MetadataHelper.h
dom/indexedDB/IDBDatabase.h
dom/indexedDB/IDBRequest.h
dom/indexedDB/IDBTransaction.h
dom/indexedDB/ipc/IndexedDBParent.h
dom/ipc/ContentParent.h
dom/ipc/TabChild.h
dom/media/MediaManager.h
dom/plugins/base/nsPluginInstanceOwner.h
dom/plugins/base/nsPluginTags.h
dom/plugins/ipc/PluginProcessParent.h
dom/src/events/nsJSEventListener.h
dom/src/geolocation/nsGeolocation.h
dom/src/jsurl/nsJSProtocolHandler.h
dom/src/notification/DesktopNotification.h
dom/src/storage/DOMStorage.h
dom/workers/FileReaderSync.h
dom/workers/WorkerPrivate.h
--- a/dom/base/nsDOMClassInfo.h
+++ b/dom/base/nsDOMClassInfo.h
@@ -2,16 +2,17 @@
 /* vim: set ts=2 sw=2 et tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsDOMClassInfo_h___
 #define nsDOMClassInfo_h___
 
+#include "mozilla/Attributes.h"
 #include "nsIDOMClassInfo.h"
 #include "nsIXPCScriptable.h"
 #include "jsapi.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsIScriptContext.h"
 #include "nsDOMJSUtils.h" // for GetScriptContextFromJSContext
 #include "nsIScriptGlobalObject.h"
 #include "xpcpublic.h"
@@ -134,21 +135,21 @@ public:
     return sXPConnect;
   }
 
 protected:
   friend nsIClassInfo* NS_GetDOMClassInfoInstance(nsDOMClassInfoID aID);
 
   const nsDOMClassInfoData* mData;
 
-  virtual void PreserveWrapper(nsISupports *aNative)
+  virtual void PreserveWrapper(nsISupports *aNative) MOZ_OVERRIDE
   {
   }
 
-  virtual uint32_t GetInterfacesBitmap()
+  virtual uint32_t GetInterfacesBitmap() MOZ_OVERRIDE
   {
     return mData->mInterfacesBitmap;
   }
 
   static nsresult Init();
   static nsresult RegisterClassProtos(int32_t aDOMClassInfoID);
   static nsresult RegisterExternalClasses();
   nsresult ResolveConstructor(JSContext *cx, JSObject *obj,
@@ -280,21 +281,21 @@ protected:
   {
   }
 
   virtual ~nsEventTargetSH()
   {
   }
 public:
   NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx,
-                       JSObject *globalObj, JSObject **parentObj);
+                       JSObject *globalObj, JSObject **parentObj) MOZ_OVERRIDE;
   NS_IMETHOD AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                         JSObject *obj, jsid id, jsval *vp, bool *_retval);
+                         JSObject *obj, jsid id, jsval *vp, bool *_retval) MOZ_OVERRIDE;
 
-  virtual void PreserveWrapper(nsISupports *aNative);
+  virtual void PreserveWrapper(nsISupports *aNative) MOZ_OVERRIDE;
 
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsEventTargetSH(aData);
   }
 };
 
 // Makes sure that the wrapper is preserved if new properties are added.
@@ -305,21 +306,21 @@ protected:
   {
   }
 
   virtual ~nsEventSH()
   {
   }
 public:
   NS_IMETHOD PreCreate(nsISupports* aNativeObj, JSContext* aCx,
-                       JSObject* aGlobalObj, JSObject** aParentObj);
+                       JSObject* aGlobalObj, JSObject** aParentObj) MOZ_OVERRIDE;
   NS_IMETHOD AddProperty(nsIXPConnectWrappedNative* aWrapper, JSContext* aCx,
-                         JSObject* aObj, jsid Id, jsval* aVp, bool* aRetval);
+                         JSObject* aObj, jsid Id, jsval* aVp, bool* aRetval) MOZ_OVERRIDE;
 
-  virtual void PreserveWrapper(nsISupports *aNative);
+  virtual void PreserveWrapper(nsISupports *aNative) MOZ_OVERRIDE;
 
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsEventSH(aData);
   }
 };
 
 // Window scriptable helper
@@ -336,43 +337,43 @@ protected:
   }
 
   static nsresult GlobalResolve(nsGlobalWindow *aWin, JSContext *cx,
                                 JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
                                 bool *did_resolve);
 
 public:
   NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx,
-                       JSObject *globalObj, JSObject **parentObj);
+                       JSObject *globalObj, JSObject **parentObj) MOZ_OVERRIDE;
 #ifdef DEBUG
   NS_IMETHOD PostCreate(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                        JSObject *obj)
+                        JSObject *obj) MOZ_OVERRIDE
   {
     nsCOMPtr<nsIScriptGlobalObject> sgo(do_QueryWrappedNative(wrapper));
 
     NS_ASSERTION(!sgo || sgo->GetGlobalJSObject() == nullptr,
                  "Multiple wrappers created for global object!");
 
     return NS_OK;
   }
-  virtual uint32_t GetScriptableFlags()
+  virtual uint32_t GetScriptableFlags() MOZ_OVERRIDE
   {
     return nsDOMGenericSH::GetScriptableFlags() |
            nsIXPCScriptable::WANT_POSTCREATE;
   }
 #endif
   NS_IMETHOD Enumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                       JSObject *obj, bool *_retval);
+                       JSObject *obj, bool *_retval) MOZ_OVERRIDE;
   NS_IMETHOD NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                         JSObject *obj, jsid id, uint32_t flags,
-                        JSObject **objp, bool *_retval);
+                        JSObject **objp, bool *_retval) MOZ_OVERRIDE;
   NS_IMETHOD Finalize(nsIXPConnectWrappedNative *wrapper, JSFreeOp *fop,
-                      JSObject *obj);
+                      JSObject *obj) MOZ_OVERRIDE;
   NS_IMETHOD OuterObject(nsIXPConnectWrappedNative *wrapper, JSContext * cx,
-                         JSObject * obj, JSObject * *_retval);
+                         JSObject * obj, JSObject * *_retval) MOZ_OVERRIDE;
 
   static JSBool GlobalScopePolluterNewResolve(JSContext *cx, JSHandleObject obj,
                                               JSHandleId id, unsigned flags,
                                               JS::MutableHandle<JSObject*> objp);
   static JSBool GlobalScopePolluterGetProperty(JSContext *cx, JSHandleObject obj,
                                                JSHandleId id, JSMutableHandleValue vp);
   static JSBool InvalidateGlobalScopePolluter(JSContext *cx,
                                               JS::Handle<JSObject*> obj);
@@ -395,20 +396,20 @@ protected:
 
   virtual ~nsLocationSH()
   {
   }
 
 public:
   NS_IMETHOD CheckAccess(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                          JSObject *obj, jsid id, uint32_t mode,
-                         jsval *vp, bool *_retval);
+                         jsval *vp, bool *_retval) MOZ_OVERRIDE;
 
   NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx,
-                       JSObject *globalObj, JSObject **parentObj);
+                       JSObject *globalObj, JSObject **parentObj) MOZ_OVERRIDE;
   NS_IMETHODIMP AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                             JSObject *obj, jsid id, jsval *vp, bool *_retval);
 
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsLocationSH(aData);
   }
 };
@@ -424,20 +425,20 @@ protected:
   }
 
   virtual ~nsNavigatorSH()
   {
   }
 
 public:
   NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx,
-                       JSObject *globalObj, JSObject **parentObj);
+                       JSObject *globalObj, JSObject **parentObj) MOZ_OVERRIDE;
   NS_IMETHOD NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                         JSObject *obj, jsid id, uint32_t flags,
-                        JSObject **objp, bool *_retval);
+                        JSObject **objp, bool *_retval) MOZ_OVERRIDE;
 
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsNavigatorSH(aData);
   }
 };
 
 // DOM Node helper, this class deals with setting the parent for the
@@ -451,25 +452,25 @@ protected:
   }
 
   virtual ~nsNodeSH()
   {
   }
 
 public:
   NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx,
-                       JSObject *globalObj, JSObject **parentObj);
+                       JSObject *globalObj, JSObject **parentObj) MOZ_OVERRIDE;
   NS_IMETHOD AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                         JSObject *obj, jsid id, jsval *vp, bool *_retval);
+                         JSObject *obj, jsid id, jsval *vp, bool *_retval) MOZ_OVERRIDE;
   NS_IMETHOD NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                         JSObject *obj, jsid id, uint32_t flags,
-                        JSObject **objp, bool *_retval);
-  NS_IMETHOD GetFlags(uint32_t *aFlags);
+                        JSObject **objp, bool *_retval) MOZ_OVERRIDE;
+  NS_IMETHOD GetFlags(uint32_t *aFlags) MOZ_OVERRIDE;
 
-  virtual void PreserveWrapper(nsISupports *aNative);
+  virtual void PreserveWrapper(nsISupports *aNative) MOZ_OVERRIDE;
 
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsNodeSH(aData);
   }
 };
 
 
@@ -483,21 +484,21 @@ protected:
   }
 
   virtual ~nsElementSH()
   {
   }
 
 public:
   NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx,
-                       JSObject *globalObj, JSObject **parentObj);
+                       JSObject *globalObj, JSObject **parentObj) MOZ_OVERRIDE;
   NS_IMETHOD PostCreate(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                        JSObject *obj);
+                        JSObject *obj) MOZ_OVERRIDE;
   NS_IMETHOD PostTransplant(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                            JSObject *obj);
+                            JSObject *obj) MOZ_OVERRIDE;
 
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsElementSH(aData);
   }
 };
 
 
@@ -512,19 +513,19 @@ protected:
 
   virtual ~nsGenericArraySH()
   {
   }
   
 public:
   NS_IMETHOD NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                         JSObject *obj, jsid id, uint32_t flags,
-                        JSObject **objp, bool *_retval);
+                        JSObject **objp, bool *_retval) MOZ_OVERRIDE;
   NS_IMETHOD Enumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                       JSObject *obj, bool *_retval);
+                       JSObject *obj, bool *_retval) MOZ_OVERRIDE;
   
   virtual nsresult GetLength(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                              JSObject *obj, uint32_t *length);
 
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsGenericArraySH(aData);
   }
@@ -546,17 +547,17 @@ protected:
 
   // Subclasses need to override this, if the implementation can't fail it's
   // allowed to not set *aResult.
   virtual nsISupports* GetItemAt(nsISupports *aNative, uint32_t aIndex,
                                  nsWrapperCache **aCache, nsresult *aResult) = 0;
 
 public:
   NS_IMETHOD GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                         JSObject *obj, jsid id, jsval *vp, bool *_retval);
+                         JSObject *obj, jsid id, jsval *vp, bool *_retval) MOZ_OVERRIDE;
 
 private:
   // Not implemented, nothing should create an instance of this class.
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData);
 };
 
 
 // NamedArray helper
@@ -569,26 +570,26 @@ protected:
   }
 
   virtual ~nsNamedArraySH()
   {
   }
 
   NS_IMETHOD NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                         JSObject *obj, jsid id, uint32_t flags,
-                        JSObject **objp, bool *_retval);
+                        JSObject **objp, bool *_retval) MOZ_OVERRIDE;
 
   virtual nsISupports* GetNamedItem(nsISupports *aNative,
                                     const nsAString& aName,
                                     nsWrapperCache **cache,
                                     nsresult *aResult) = 0;
 
 public:
   NS_IMETHOD GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                         JSObject *obj, jsid id, jsval *vp, bool *_retval);
+                         JSObject *obj, jsid id, jsval *vp, bool *_retval) MOZ_OVERRIDE;
 
 private:
   // Not implemented, nothing should create an instance of this class.
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData);
 };
 
 
 // HTMLDocument helper
@@ -628,25 +629,25 @@ protected:
 
   virtual ~nsHTMLFormElementSH()
   {
   }
 
 public:
   NS_IMETHOD NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                         JSObject *obj, jsid id, uint32_t flags,
-                        JSObject **objp, bool *_retval);
+                        JSObject **objp, bool *_retval) MOZ_OVERRIDE;
   NS_IMETHOD GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                          JSObject *obj, jsid id, jsval *vp,
-                         bool *_retval);
+                         bool *_retval) MOZ_OVERRIDE;
 
   NS_IMETHOD NewEnumerate(nsIXPConnectWrappedNative *wrapper,
                           JSContext *cx, JSObject *obj,
                           uint32_t enum_op, jsval *statep,
-                          jsid *idp, bool *_retval);
+                          jsid *idp, bool *_retval) MOZ_OVERRIDE;
 
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsHTMLFormElementSH(aData);
   }
 };
 
 
@@ -659,23 +660,23 @@ protected:
   {
   }
 
   virtual ~nsPluginSH()
   {
   }
 
   virtual nsISupports* GetItemAt(nsISupports *aNative, uint32_t aIndex,
-                                 nsWrapperCache **aCache, nsresult *aResult);
+                                 nsWrapperCache **aCache, nsresult *aResult) MOZ_OVERRIDE;
 
   // Override nsNamedArraySH::GetNamedItem()
   virtual nsISupports* GetNamedItem(nsISupports *aNative,
                                     const nsAString& aName,
                                     nsWrapperCache **cache,
-                                    nsresult *aResult);
+                                    nsresult *aResult) MOZ_OVERRIDE;
 
 public:
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsPluginSH(aData);
   }
 };
 
@@ -689,23 +690,23 @@ protected:
   {
   }
 
   virtual ~nsPluginArraySH()
   {
   }
 
   virtual nsISupports* GetItemAt(nsISupports *aNative, uint32_t aIndex,
-                                 nsWrapperCache **aCache, nsresult *aResult);
+                                 nsWrapperCache **aCache, nsresult *aResult) MOZ_OVERRIDE;
 
   // Override nsNamedArraySH::GetNamedItem()
   virtual nsISupports* GetNamedItem(nsISupports *aNative,
                                     const nsAString& aName,
                                     nsWrapperCache **cache,
-                                    nsresult *aResult);
+                                    nsresult *aResult) MOZ_OVERRIDE;
 
 public:
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsPluginArraySH(aData);
   }
 };
 
@@ -719,23 +720,23 @@ protected:
   {
   }
 
   virtual ~nsMimeTypeArraySH()
   {
   }
 
   virtual nsISupports* GetItemAt(nsISupports *aNative, uint32_t aIndex,
-                                 nsWrapperCache **aCache, nsresult *aResult);
+                                 nsWrapperCache **aCache, nsresult *aResult) MOZ_OVERRIDE;
 
   // Override nsNamedArraySH::GetNamedItem()
   virtual nsISupports* GetNamedItem(nsISupports *aNative,
                                     const nsAString& aName,
                                     nsWrapperCache **cache,
-                                    nsresult *aResult);
+                                    nsresult *aResult) MOZ_OVERRIDE;
 
 public:
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsMimeTypeArraySH(aData);
   }
 };
 
@@ -753,17 +754,17 @@ protected:
   {
   }
 
   virtual nsresult GetStringAt(nsISupports *aNative, int32_t aIndex,
                                nsAString& aResult) = 0;
 
 public:
   NS_IMETHOD GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                         JSObject *obj, jsid id, jsval *vp, bool *_retval);
+                         JSObject *obj, jsid id, jsval *vp, bool *_retval) MOZ_OVERRIDE;
 };
 
 
 // History helper
 
 class nsHistorySH : public nsStringArraySH
 {
 protected:
@@ -771,23 +772,23 @@ protected:
   {
   }
 
   virtual ~nsHistorySH()
   {
   }
 
   virtual nsresult GetStringAt(nsISupports *aNative, int32_t aIndex,
-                               nsAString& aResult);
+                               nsAString& aResult) MOZ_OVERRIDE;
 
 public:
   NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx,
-                       JSObject *globalObj, JSObject **parentObj);
+                       JSObject *globalObj, JSObject **parentObj) MOZ_OVERRIDE;
   NS_IMETHOD GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                         JSObject *obj, jsid id, jsval *vp, bool *_retval);
+                         JSObject *obj, jsid id, jsval *vp, bool *_retval) MOZ_OVERRIDE;
 
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsHistorySH(aData);
   }
 };
 
 // StringList scriptable helper
@@ -799,17 +800,17 @@ protected:
   {
   }
 
   virtual ~nsStringListSH()
   {
   }
 
   virtual nsresult GetStringAt(nsISupports *aNative, int32_t aIndex,
-                               nsAString& aResult);
+                               nsAString& aResult) MOZ_OVERRIDE;
 
 public:
   // Inherit GetProperty, Enumerate from nsStringArraySH
   
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsStringListSH(aData);
   }
@@ -825,17 +826,17 @@ protected:
   {
   }
 
   virtual ~nsMediaListSH()
   {
   }
 
   virtual nsresult GetStringAt(nsISupports *aNative, int32_t aIndex,
-                               nsAString& aResult);
+                               nsAString& aResult) MOZ_OVERRIDE;
 
 public:
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsMediaListSH(aData);
   }
 };
 
@@ -849,17 +850,17 @@ protected:
   {
   }
 
   virtual ~nsStyleSheetListSH()
   {
   }
 
   virtual nsISupports* GetItemAt(nsISupports *aNative, uint32_t aIndex,
-                                 nsWrapperCache **aCache, nsresult *aResult);
+                                 nsWrapperCache **aCache, nsresult *aResult) MOZ_OVERRIDE;
 
 public:
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsStyleSheetListSH(aData);
   }
 };
 
@@ -873,17 +874,17 @@ protected:
   {
   }
 
   virtual ~nsCSSRuleListSH()
   {
   }
 
   virtual nsISupports* GetItemAt(nsISupports *aNative, uint32_t aIndex,
-                                 nsWrapperCache **aCache, nsresult *aResult);
+                                 nsWrapperCache **aCache, nsresult *aResult) MOZ_OVERRIDE;
 
 public:
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsCSSRuleListSH(aData);
   }
 };
 
@@ -894,17 +895,17 @@ class nsDOMTouchListSH : public nsArrayS
   {
   }
 
   virtual ~nsDOMTouchListSH()
   {
   }
 
   virtual nsISupports* GetItemAt(nsISupports *aNative, uint32_t aIndex,
-                                 nsWrapperCache **aCache, nsresult *aResult);
+                                 nsWrapperCache **aCache, nsresult *aResult) MOZ_OVERRIDE;
 
   public:
   static nsIClassInfo* doCreate(nsDOMClassInfoData* aData)
   {
     return new nsDOMTouchListSH(aData);
   }
 };
 
@@ -918,26 +919,26 @@ protected:
   }
 
   virtual ~nsStorage2SH()
   {
   }
 
   NS_IMETHOD NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                         JSObject *obj, jsid id, uint32_t flags,
-                        JSObject **objp, bool *_retval);
+                        JSObject **objp, bool *_retval) MOZ_OVERRIDE;
   NS_IMETHOD SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                         JSObject *obj, jsid id, jsval *vp, bool *_retval);
+                         JSObject *obj, jsid id, jsval *vp, bool *_retval) MOZ_OVERRIDE;
   NS_IMETHOD GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                         JSObject *obj, jsid id, jsval *vp, bool *_retval);
+                         JSObject *obj, jsid id, jsval *vp, bool *_retval) MOZ_OVERRIDE;
   NS_IMETHOD DelProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                         JSObject *obj, jsid id, bool *_retval);
+                         JSObject *obj, jsid id, bool *_retval) MOZ_OVERRIDE;
   NS_IMETHOD NewEnumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                           JSObject *obj, uint32_t enum_op, jsval *statep,
-                          jsid *idp, bool *_retval);
+                          jsid *idp, bool *_retval) MOZ_OVERRIDE;
 
 public:
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsStorage2SH(aData);
   }
 };
 
@@ -970,29 +971,29 @@ class nsDOMConstructorSH : public nsDOMG
 {
 protected:
   nsDOMConstructorSH(nsDOMClassInfoData* aData) : nsDOMGenericSH(aData)
   {
   }
 
 public:
   NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx,
-                       JSObject *globalObj, JSObject **parentObj);
-  NS_IMETHOD PostCreatePrototype(JSContext * cx, JSObject * proto)
+                       JSObject *globalObj, JSObject **parentObj) MOZ_OVERRIDE;
+  NS_IMETHOD PostCreatePrototype(JSContext * cx, JSObject * proto) MOZ_OVERRIDE
   {
     return NS_OK;
   }
   NS_IMETHOD NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                         JSObject *obj, jsid id, uint32_t flags,
-                        JSObject **objp, bool *_retval);
+                        JSObject **objp, bool *_retval) MOZ_OVERRIDE;
   NS_IMETHOD Call(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                  JSObject *obj, const JS::CallArgs &args, bool *_retval);
+                  JSObject *obj, const JS::CallArgs &args, bool *_retval) MOZ_OVERRIDE;
 
   NS_IMETHOD Construct(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
-                       JSObject *obj, const JS::CallArgs &args, bool *_retval);
+                       JSObject *obj, const JS::CallArgs &args, bool *_retval) MOZ_OVERRIDE;
 
   NS_IMETHOD HasInstance(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                          JSObject *obj, const jsval &val, bool *bp,
                          bool *_retval);
 
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsDOMConstructorSH(aData);
@@ -1006,17 +1007,17 @@ protected:
   {
   }
 
   virtual ~nsNonDOMObjectSH()
   {
   }
 
 public:
-  NS_IMETHOD GetFlags(uint32_t *aFlags);
+  NS_IMETHOD GetFlags(uint32_t *aFlags) MOZ_OVERRIDE;
 
   static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
   {
     return new nsNonDOMObjectSH(aData);
   }
 };
 
 #endif /* nsDOMClassInfo_h___ */
--- a/dom/base/nsDOMScriptObjectFactory.h
+++ b/dom/base/nsDOMScriptObjectFactory.h
@@ -31,26 +31,26 @@ public:
   nsDOMScriptObjectFactory();
 
   NS_DECL_ISUPPORTS
 
   // nsIObserver
   NS_DECL_NSIOBSERVER
 
   // nsIDOMScriptObjectFactory
-  NS_IMETHOD_(nsISupports *) GetClassInfoInstance(nsDOMClassInfoID aID);
-  NS_IMETHOD_(nsISupports *) GetExternalClassInfoInstance(const nsAString& aName);
+  NS_IMETHOD_(nsISupports *) GetClassInfoInstance(nsDOMClassInfoID aID) MOZ_OVERRIDE;
+  NS_IMETHOD_(nsISupports *) GetExternalClassInfoInstance(const nsAString& aName) MOZ_OVERRIDE;
 
   NS_IMETHOD RegisterDOMClassInfo(const char *aName,
                                   nsDOMClassInfoExternalConstructorFnc aConstructorFptr,
                                   const nsIID *aProtoChainInterface,
                                   const nsIID **aInterfaces,
                                   uint32_t aScriptableFlags,
                                   bool aHasClassInterface,
-                                  const nsCID *aConstructorCID);
+                                  const nsCID *aConstructorCID) MOZ_OVERRIDE;
 };
 
 class nsDOMExceptionProvider MOZ_FINAL : public nsIExceptionProvider
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIEXCEPTIONPROVIDER
 };
--- a/dom/base/nsJSEnvironment.h
+++ b/dom/base/nsJSEnvironment.h
@@ -43,65 +43,65 @@ public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsJSContext,
                                                          nsIScriptContext)
 
   virtual nsresult EvaluateString(const nsAString& aScript,
                                   JS::Handle<JSObject*> aScopeObject,
                                   JS::CompileOptions &aOptions,
                                   bool aCoerceToString,
-                                  JS::Value* aRetValue);
+                                  JS::Value* aRetValue) MOZ_OVERRIDE;
 
   virtual nsresult CompileScript(const PRUnichar* aText,
                                  int32_t aTextLength,
                                  nsIPrincipal *principal,
                                  const char *aURL,
                                  uint32_t aLineNo,
                                  uint32_t aVersion,
                                  JS::MutableHandle<JSScript*> aScriptObject,
-                                 bool aSaveSource = false);
+                                 bool aSaveSource = false) MOZ_OVERRIDE;
   virtual nsresult ExecuteScript(JSScript* aScriptObject,
-                                 JSObject* aScopeObject);
+                                 JSObject* aScopeObject) MOZ_OVERRIDE;
 
   virtual nsresult BindCompiledEventHandler(nsISupports *aTarget,
                                             JS::Handle<JSObject*> aScope,
                                             JS::Handle<JSObject*> aHandler,
-                                            JS::MutableHandle<JSObject*> aBoundHandler);
+                                            JS::MutableHandle<JSObject*> aBoundHandler) MOZ_OVERRIDE;
 
-  virtual nsIScriptGlobalObject *GetGlobalObject();
+  virtual nsIScriptGlobalObject *GetGlobalObject() MOZ_OVERRIDE;
   inline nsIScriptGlobalObject *GetGlobalObjectRef() { return mGlobalObjectRef; }
 
-  virtual JSContext* GetNativeContext();
-  virtual JSObject* GetNativeGlobal();
-  virtual nsresult InitContext();
-  virtual bool IsContextInitialized();
+  virtual JSContext* GetNativeContext() MOZ_OVERRIDE;
+  virtual JSObject* GetNativeGlobal() MOZ_OVERRIDE;
+  virtual nsresult InitContext() MOZ_OVERRIDE;
+  virtual bool IsContextInitialized() MOZ_OVERRIDE;
 
-  virtual void ScriptEvaluated(bool aTerminated);
-  virtual bool GetScriptsEnabled();
-  virtual void SetScriptsEnabled(bool aEnabled, bool aFireTimeouts);
+  virtual void ScriptEvaluated(bool aTerminated) MOZ_OVERRIDE;
+  virtual bool GetScriptsEnabled() MOZ_OVERRIDE;
+  virtual void SetScriptsEnabled(bool aEnabled, bool aFireTimeouts) MOZ_OVERRIDE;
 
-  virtual nsresult SetProperty(JS::Handle<JSObject*> aTarget, const char* aPropName, nsISupports* aVal);
+  virtual nsresult SetProperty(JS::Handle<JSObject*> aTarget, const char* aPropName, nsISupports* aVal) MOZ_OVERRIDE;
 
-  virtual bool GetProcessingScriptTag();
-  virtual void SetProcessingScriptTag(bool aResult);
+  virtual bool GetProcessingScriptTag() MOZ_OVERRIDE;
+  virtual void SetProcessingScriptTag(bool aResult) MOZ_OVERRIDE;
 
-  virtual bool GetExecutingScript();
+  virtual bool GetExecutingScript() MOZ_OVERRIDE;
 
-  virtual nsresult InitClasses(JS::Handle<JSObject*> aGlobalObj);
+  virtual nsresult InitClasses(JS::Handle<JSObject*> aGlobalObj) MOZ_OVERRIDE;
 
-  virtual void WillInitializeContext();
-  virtual void DidInitializeContext();
+  virtual void WillInitializeContext() MOZ_OVERRIDE;
+  virtual void DidInitializeContext() MOZ_OVERRIDE;
 
   virtual nsresult Serialize(nsIObjectOutputStream* aStream,
-                             JS::Handle<JSScript*> aScriptObject);
+                             JS::Handle<JSScript*> aScriptObject) MOZ_OVERRIDE;
   virtual nsresult Deserialize(nsIObjectInputStream* aStream,
-                               JS::MutableHandle<JSScript*> aResult);
+                               JS::MutableHandle<JSScript*> aResult) MOZ_OVERRIDE;
 
-  virtual void EnterModalState();
-  virtual void LeaveModalState();
+  virtual void EnterModalState() MOZ_OVERRIDE;
+  virtual void LeaveModalState() MOZ_OVERRIDE;
 
   NS_DECL_NSIXPCSCRIPTNOTIFY
 
   static void LoadStart();
   static void LoadEnd();
 
   enum IsCompartment {
     CompartmentGC,
@@ -139,17 +139,17 @@ public:
   static void MaybePokeCC();
   static void KillCCTimer();
   static void KillFullGCTimer();
   static void KillInterSliceGCTimer();
 
   // Calling LikelyShortLivingObjectCreated() makes a GC more likely.
   static void LikelyShortLivingObjectCreated();
 
-  virtual void GC(JS::gcreason::Reason aReason);
+  virtual void GC(JS::gcreason::Reason aReason) MOZ_OVERRIDE;
 
   static uint32_t CleanupsSinceLastGC();
 
   nsIScriptGlobalObject* GetCachedGlobalObject()
   {
     // Verify that we have a global so that this
     // does always return a null when GetGlobalObject() is null.
     JSObject* global = GetNativeGlobal();
@@ -218,17 +218,17 @@ public:
   static JSRuntime *sRuntime;
 
 public:
   // nsISupports
   NS_DECL_ISUPPORTS
 
   virtual already_AddRefed<nsIScriptContext>
   CreateContext(bool aGCOnDestruction,
-                nsIScriptGlobalObject* aGlobalObject);
+                nsIScriptGlobalObject* aGlobalObject) MOZ_OVERRIDE;
 
   static void Startup();
   static void Shutdown();
   // Setup all the statics etc - safe to call multiple times after Startup()
   static nsresult Init();
   // Get the NameSpaceManager, creating if necessary
   static nsScriptNameSpaceManager* GetNameSpaceManager();
 };
--- a/dom/base/nsWindowRoot.h
+++ b/dom/base/nsWindowRoot.h
@@ -9,16 +9,17 @@
 
 class nsPIDOMWindow;
 class nsIDOMEventListener;
 class nsEventListenerManager;
 class nsIDOMEvent;
 class nsEventChainPreVisitor;
 class nsEventChainPostVisitor;
 
+#include "mozilla/Attributes.h"
 #include "nsIDOMEventTarget.h"
 #include "nsEventListenerManager.h"
 #include "nsPIWindowRoot.h"
 #include "nsCycleCollectionParticipant.h"
 
 class nsWindowRoot : public nsPIWindowRoot
 {
 public:
@@ -31,30 +32,30 @@ public:
   virtual void AddEventListener(const nsAString& aType,
                                 nsIDOMEventListener* aListener,
                                 bool aUseCapture,
                                 const mozilla::dom::Nullable<bool>& aWantsUntrusted,
                                 mozilla::ErrorResult& aRv) MOZ_OVERRIDE;
 
   // nsPIWindowRoot
 
-  virtual nsPIDOMWindow* GetWindow();
+  virtual nsPIDOMWindow* GetWindow() MOZ_OVERRIDE;
 
-  virtual nsresult GetControllers(nsIControllers** aResult);
+  virtual nsresult GetControllers(nsIControllers** aResult) MOZ_OVERRIDE;
   virtual nsresult GetControllerForCommand(const char * aCommand,
-                                           nsIController** _retval);
+                                           nsIController** _retval) MOZ_OVERRIDE;
 
-  virtual nsIDOMNode* GetPopupNode();
-  virtual void SetPopupNode(nsIDOMNode* aNode);
+  virtual nsIDOMNode* GetPopupNode() MOZ_OVERRIDE;
+  virtual void SetPopupNode(nsIDOMNode* aNode) MOZ_OVERRIDE;
 
-  virtual void SetParentTarget(mozilla::dom::EventTarget* aTarget)
+  virtual void SetParentTarget(mozilla::dom::EventTarget* aTarget) MOZ_OVERRIDE
   {
     mParent = aTarget;
   }
-  virtual mozilla::dom::EventTarget* GetParentTarget() { return mParent; }
+  virtual mozilla::dom::EventTarget* GetParentTarget() MOZ_OVERRIDE { return mParent; }
   virtual nsIDOMWindow* GetOwnerGlobal() MOZ_OVERRIDE;
 
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsWindowRoot,
                                                          nsIDOMEventTarget)
 
 protected:
   // Members
   nsPIDOMWindow* mWindow; // [Weak]. The window will hold on to us and let go when it dies.
--- a/dom/bluetooth/BluetoothAdapter.h
+++ b/dom/bluetooth/BluetoothAdapter.h
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_bluetooth_bluetoothadapter_h__
 #define mozilla_dom_bluetooth_bluetoothadapter_h__
 
+#include "mozilla/Attributes.h"
 #include "BluetoothCommon.h"
 #include "BluetoothPropertyContainer.h"
 #include "nsCOMPtr.h"
 #include "nsDOMEventTargetHelper.h"
 #include "nsIDOMBluetoothAdapter.h"
 
 class nsIEventTarget;
 class nsIDOMDOMRequest;
@@ -43,17 +44,17 @@ public:
 
   nsISupports*
   ToISupports()
   {
     return static_cast<EventTarget*>(this);
   }
 
   void Unroot();
-  virtual void SetPropertyByValue(const BluetoothNamedValue& aValue);  
+  virtual void SetPropertyByValue(const BluetoothNamedValue& aValue) MOZ_OVERRIDE;  
 private:
 
   BluetoothAdapter(nsPIDOMWindow* aOwner, const BluetoothValue& aValue);
   ~BluetoothAdapter();
 
   void Root();
   nsresult StartStopDiscovery(bool aStart, nsIDOMDOMRequest** aRequest);
   nsresult PairUnpair(bool aPair,
--- a/dom/bluetooth/BluetoothDevice.h
+++ b/dom/bluetooth/BluetoothDevice.h
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_bluetooth_bluetoothdevice_h__
 #define mozilla_dom_bluetooth_bluetoothdevice_h__
 
+#include "mozilla/Attributes.h"
 #include "BluetoothCommon.h"
 #include "BluetoothPropertyContainer.h"
 #include "nsDOMEventTargetHelper.h"
 #include "nsIDOMBluetoothDevice.h"
 #include "nsString.h"
 
 class nsIDOMDOMRequest;
 
@@ -43,17 +44,17 @@ public:
   void Notify(const BluetoothSignal& aParam);
 
   nsISupports*
   ToISupports()
   {
     return static_cast<EventTarget*>(this);
   }
 
-  void SetPropertyByValue(const BluetoothNamedValue& aValue);
+  void SetPropertyByValue(const BluetoothNamedValue& aValue) MOZ_OVERRIDE;
 
   void Unroot();
 private:
   BluetoothDevice(nsPIDOMWindow* aOwner, const nsAString& aAdapterPath,
                   const BluetoothValue& aValue);
   ~BluetoothDevice();
   void Root();
 
--- a/dom/bluetooth/BluetoothManager.h
+++ b/dom/bluetooth/BluetoothManager.h
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_bluetooth_bluetoothmanager_h__
 #define mozilla_dom_bluetooth_bluetoothmanager_h__
 
+#include "mozilla/Attributes.h"
 #include "BluetoothCommon.h"
 #include "BluetoothPropertyContainer.h"
 #include "nsDOMEventTargetHelper.h"
 #include "nsIDOMBluetoothManager.h"
 #include "mozilla/Observer.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
@@ -26,17 +27,17 @@ public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIDOMBLUETOOTHMANAGER
 
   NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper)
 
   static already_AddRefed<BluetoothManager>
   Create(nsPIDOMWindow* aWindow);
   void Notify(const BluetoothSignal& aData);
-  virtual void SetPropertyByValue(const BluetoothNamedValue& aValue);
+  virtual void SetPropertyByValue(const BluetoothNamedValue& aValue) MOZ_OVERRIDE;
 private:
   BluetoothManager(nsPIDOMWindow* aWindow);
   ~BluetoothManager();
 };
 
 END_BLUETOOTH_NAMESPACE
 
 nsresult NS_NewBluetoothManager(nsPIDOMWindow* aWindow,
--- a/dom/bluetooth/BluetoothReplyRunnable.h
+++ b/dom/bluetooth/BluetoothReplyRunnable.h
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_bluetooth_bluetoothreplyrunnable_h__
 #define mozilla_dom_bluetooth_bluetoothreplyrunnable_h__
 
+#include "mozilla/Attributes.h"
 #include "BluetoothCommon.h"
 #include "nsThreadUtils.h"
 #include "jsapi.h"
 
 class nsIDOMDOMRequest;
 
 BEGIN_BLUETOOTH_NAMESPACE
 
@@ -53,17 +54,17 @@ private:
 
 class BluetoothVoidReplyRunnable : public BluetoothReplyRunnable
 {
 public:
   BluetoothVoidReplyRunnable(nsIDOMDOMRequest* aReq);
  ~BluetoothVoidReplyRunnable();
 
 protected:
-  virtual bool ParseSuccessfulReply(JS::Value* aValue)
+  virtual bool ParseSuccessfulReply(JS::Value* aValue) MOZ_OVERRIDE
   {
     *aValue = JSVAL_VOID;
     return true;
   }
 };
 
 END_BLUETOOTH_NAMESPACE
 
--- a/dom/bluetooth/gonk/BluetoothGonkService.h
+++ b/dom/bluetooth/gonk/BluetoothGonkService.h
@@ -13,16 +13,17 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 #ifndef mozilla_dom_bluetooth_bluetoothgonkservice_h__
 #define mozilla_dom_bluetooth_bluetoothgonkservice_h__
 
+#include "mozilla/Attributes.h"
 #include "BluetoothCommon.h"
 #include "BluetoothDBusService.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 /**
  * BluetoothService functions are used to dispatch messages to Bluetooth DOM
  * objects on the main thread, as well as provide platform independent access
@@ -36,28 +37,28 @@ class BluetoothGonkService : public Blue
 {
 public:
   /**
    * Set up variables and start the platform specific connection. Must
    * be called from non-main thread.
    *
    * @return NS_OK if connection starts successfully, NS_ERROR_FAILURE otherwise
    */
-  virtual nsresult StartInternal();
+  virtual nsresult StartInternal() MOZ_OVERRIDE;
 
   /**
    * Stop the platform specific connection. Must be called from non-main thread.
    *
    * @return NS_OK if connection starts successfully, NS_ERROR_FAILURE otherwise
    */
-  virtual nsresult StopInternal();
+  virtual nsresult StopInternal() MOZ_OVERRIDE;
 
   /**
    * Get status of Bluetooth. Must be called from non-main thread.
    *
    * @return true if Bluetooth is enabled, false otherwise
    */
-  virtual bool IsEnabledInternal();
+  virtual bool IsEnabledInternal() MOZ_OVERRIDE;
 };
 
 END_BLUETOOTH_NAMESPACE
 
 #endif
--- a/dom/bluetooth/linux/BluetoothDBusService.h
+++ b/dom/bluetooth/linux/BluetoothDBusService.h
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_bluetooth_bluetoothdbuseventservice_h__
 #define mozilla_dom_bluetooth_bluetoothdbuseventservice_h__
 
+#include "mozilla/Attributes.h"
 #include "BluetoothCommon.h"
 #include "mozilla/ipc/RawDBusConnection.h"
 #include "BluetoothService.h"
 
 class DBusMessage;
 
 BEGIN_BLUETOOTH_NAMESPACE
 
@@ -21,48 +22,48 @@ BEGIN_BLUETOOTH_NAMESPACE
  */
 
 class BluetoothDBusService : public BluetoothService
                            , private mozilla::ipc::RawDBusConnection
 {
 public:
   bool IsReady();
 
-  virtual nsresult StartInternal();
+  virtual nsresult StartInternal() MOZ_OVERRIDE;
 
-  virtual nsresult StopInternal();
+  virtual nsresult StopInternal() MOZ_OVERRIDE;
 
-  virtual bool IsEnabledInternal();
+  virtual bool IsEnabledInternal() MOZ_OVERRIDE;
 
   virtual nsresult GetDefaultAdapterPathInternal(
-                                             BluetoothReplyRunnable* aRunnable);
+                                             BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
   virtual nsresult GetConnectedDevicePropertiesInternal(uint16_t aProfileId,
-                                             BluetoothReplyRunnable* aRunnable);
+                                             BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
   virtual nsresult GetPairedDevicePropertiesInternal(
                                      const nsTArray<nsString>& aDeviceAddresses,
-                                     BluetoothReplyRunnable* aRunnable);
+                                     BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
-  virtual nsresult StartDiscoveryInternal(BluetoothReplyRunnable* aRunnable);
+  virtual nsresult StartDiscoveryInternal(BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
-  virtual nsresult StopDiscoveryInternal(BluetoothReplyRunnable* aRunnable);
+  virtual nsresult StopDiscoveryInternal(BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
   virtual nsresult
-  GetDevicePropertiesInternal(const BluetoothSignal& aSignal);
+  GetDevicePropertiesInternal(const BluetoothSignal& aSignal) MOZ_OVERRIDE;
 
   virtual nsresult
   SetProperty(BluetoothObjectType aType,
               const BluetoothNamedValue& aValue,
-              BluetoothReplyRunnable* aRunnable);
+              BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
   virtual bool
   GetDevicePath(const nsAString& aAdapterPath,
                 const nsAString& aDeviceAddress,
-                nsAString& aDevicePath);
+                nsAString& aDevicePath) MOZ_OVERRIDE;
 
   static bool
   AddServiceRecords(const char* serviceName,
                     unsigned long long uuidMsb,
                     unsigned long long uuidLsb,
                     int channel);
 
   static bool
@@ -77,88 +78,88 @@ public:
 
   static bool
   RemoveReservedServicesInternal(const nsTArray<uint32_t>& aServiceHandles);
 
   virtual nsresult
   GetScoSocket(const nsAString& aObjectPath,
                bool aAuth,
                bool aEncrypt,
-               mozilla::ipc::UnixSocketConsumer* aConsumer);
+               mozilla::ipc::UnixSocketConsumer* aConsumer) MOZ_OVERRIDE;
 
   virtual nsresult
   GetServiceChannel(const nsAString& aDeviceAddress,
                     const nsAString& aServiceUuid,
-                    BluetoothProfileManagerBase* aManager);
+                    BluetoothProfileManagerBase* aManager) MOZ_OVERRIDE;
 
   virtual bool
   UpdateSdpRecords(const nsAString& aDeviceAddress,
-                   BluetoothProfileManagerBase* aManager);
+                   BluetoothProfileManagerBase* aManager) MOZ_OVERRIDE;
 
   virtual nsresult
   CreatePairedDeviceInternal(const nsAString& aDeviceAddress,
                              int aTimeout,
-                             BluetoothReplyRunnable* aRunnable);
+                             BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
   virtual nsresult
   RemoveDeviceInternal(const nsAString& aDeviceObjectPath,
-                       BluetoothReplyRunnable* aRunnable);
+                       BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
   virtual bool
   SetPinCodeInternal(const nsAString& aDeviceAddress, const nsAString& aPinCode,
-                     BluetoothReplyRunnable* aRunnable);
+                     BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
   virtual bool
   SetPasskeyInternal(const nsAString& aDeviceAddress, uint32_t aPasskey,
-                     BluetoothReplyRunnable* aRunnable);
+                     BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
   virtual bool
   SetPairingConfirmationInternal(const nsAString& aDeviceAddress, bool aConfirm,
-                                 BluetoothReplyRunnable* aRunnable);
+                                 BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
   virtual bool
   SetAuthorizationInternal(const nsAString& aDeviceAddress, bool aAllow,
-                           BluetoothReplyRunnable* aRunnable);
+                           BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
   virtual nsresult
-  PrepareAdapterInternal();
+  PrepareAdapterInternal() MOZ_OVERRIDE;
 
   virtual void
   Connect(const nsAString& aDeviceAddress,
           const uint16_t aProfileId,
           BluetoothReplyRunnable* aRunnable);
 
   virtual bool
-  IsConnected(uint16_t aProfileId);
+  IsConnected(uint16_t aProfileId) MOZ_OVERRIDE;
 
   virtual void
   Disconnect(const uint16_t aProfileId, BluetoothReplyRunnable* aRunnable);
 
   virtual void
   SendFile(const nsAString& aDeviceAddress,
            BlobParent* aBlobParent,
            BlobChild* aBlobChild,
-           BluetoothReplyRunnable* aRunnable);
+           BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
   virtual void
   StopSendingFile(const nsAString& aDeviceAddress,
-                  BluetoothReplyRunnable* aRunnable);
+                  BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
   virtual void
   ConfirmReceivingFile(const nsAString& aDeviceAddress, bool aConfirm,
-                       BluetoothReplyRunnable* aRunnable);
+                       BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
   virtual void
-  ConnectSco(BluetoothReplyRunnable* aRunnable);
+  ConnectSco(BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
   virtual void
-  DisconnectSco(BluetoothReplyRunnable* aRunnable);
+  DisconnectSco(BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
   virtual void
-  IsScoConnected(BluetoothReplyRunnable* aRunnable);
+  IsScoConnected(BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
 
 private:
   nsresult SendGetPropertyMessage(const nsAString& aPath,
                                   const char* aInterface,
                                   void (*aCB)(DBusMessage *, void *),
                                   BluetoothReplyRunnable* aRunnable);
   nsresult SendDiscoveryMessage(const char* aMessageName,
                                 BluetoothReplyRunnable* aRunnable);
--- a/dom/camera/CameraControlImpl.h
+++ b/dom/camera/CameraControlImpl.h
@@ -1,15 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef DOM_CAMERA_CAMERACONTROLIMPL_H
 #define DOM_CAMERA_CAMERACONTROLIMPL_H
 
+#include "mozilla/Attributes.h"
 #include "nsDOMFile.h"
 #include "nsProxyRelease.h"
 #include "DictionaryHelpers.h"
 #include "nsIDOMDeviceStorage.h"
 #include "DOMCameraManager.h"
 #include "DOMCameraPreview.h"
 #include "ICameraControl.h"
 #include "CameraCommon.h"
@@ -160,17 +161,17 @@ class CameraErrorResult : public nsRunna
 {
 public:
   CameraErrorResult(nsMainThreadPtrHandle<nsICameraErrorCallback> onError, const nsString& aErrorMsg, uint64_t aWindowId)
     : mOnErrorCb(onError)
     , mErrorMsg(aErrorMsg)
     , mWindowId(aWindowId)
   { }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     if (mOnErrorCb.get() && nsDOMCameraManager::IsWindowStillActive(mWindowId)) {
       mOnErrorCb->HandleEvent(mErrorMsg);
     }
     return NS_OK;
   }
@@ -197,17 +198,17 @@ public:
   }
 
   virtual ~GetPreviewStreamResult()
   {
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
   // Run() method is implementation specific.
-  NS_IMETHOD Run();
+  NS_IMETHOD Run() MOZ_OVERRIDE;
 
 protected:
   nsRefPtr<CameraControlImpl> mCameraControl;
   uint32_t mWidth;
   uint32_t mHeight;
   uint32_t mFramesPerSecond;
   nsMainThreadPtrHandle<nsICameraPreviewStreamCallback> mOnSuccessCb;
   uint64_t mWindowId;
@@ -226,17 +227,17 @@ public:
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
   virtual ~GetPreviewStreamTask()
   {
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     nsresult rv = mCameraControl->GetPreviewStreamImpl(this);
 
     if (NS_FAILED(rv)) {
       nsCOMPtr<nsIRunnable> cameraErrorResult = new CameraErrorResult(mOnErrorCb, NS_LITERAL_STRING("FAILURE"), mCameraControl->GetWindowId());
       rv = NS_DispatchToMainThread(cameraErrorResult);
       NS_ENSURE_SUCCESS(rv, rv);
     }
@@ -256,17 +257,17 @@ public:
   AutoFocusResult(bool aSuccess, nsMainThreadPtrHandle<nsICameraAutoFocusCallback> onSuccess, uint64_t aWindowId)
     : mSuccess(aSuccess)
     , mOnSuccessCb(onSuccess)
     , mWindowId(aWindowId)
   { }
 
   virtual ~AutoFocusResult() { }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     if (mOnSuccessCb.get() && nsDOMCameraManager::IsWindowStillActive(mWindowId)) {
       mOnSuccessCb->HandleEvent(mSuccess);
     }
     return NS_OK;
   }
@@ -290,17 +291,17 @@ public:
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
   virtual ~AutoFocusTask()
   {
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     DOM_CAMERA_LOGT("%s:%d\n", __func__, __LINE__);
     nsresult rv = mCameraControl->AutoFocusImpl(this);
     DOM_CAMERA_LOGT("%s:%d\n", __func__, __LINE__);
 
     if (NS_FAILED(rv)) {
       nsCOMPtr<nsIRunnable> cameraErrorResult = new CameraErrorResult(mOnErrorCb, NS_LITERAL_STRING("FAILURE"), mCameraControl->GetWindowId());
       rv = NS_DispatchToMainThread(cameraErrorResult);
@@ -329,17 +330,17 @@ public:
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
   virtual ~TakePictureResult()
   {
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
     if (mOnSuccessCb.get() && nsDOMCameraManager::IsWindowStillActive(mWindowId)) {
       nsCOMPtr<nsIDOMBlob> image = new nsDOMMemoryFile(static_cast<void*>(mData), static_cast<uint64_t>(mLength), mMimeType);
       mOnSuccessCb->HandleEvent(image);
     } else {
@@ -375,17 +376,17 @@ public:
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
   virtual ~TakePictureTask()
   {
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     DOM_CAMERA_LOGT("%s:%d\n", __func__, __LINE__);
     nsresult rv = mCameraControl->TakePictureImpl(this);
     DOM_CAMERA_LOGT("%s:%d\n", __func__, __LINE__);
 
     if (NS_FAILED(rv)) {
       nsCOMPtr<nsIRunnable> cameraErrorResult = new CameraErrorResult(mOnErrorCb, NS_LITERAL_STRING("FAILURE"), mCameraControl->GetWindowId());
       rv = NS_DispatchToMainThread(cameraErrorResult);
@@ -411,17 +412,17 @@ class StartRecordingResult : public nsRu
 public:
   StartRecordingResult(nsMainThreadPtrHandle<nsICameraStartRecordingCallback> onSuccess, uint64_t aWindowId)
     : mOnSuccessCb(onSuccess)
     , mWindowId(aWindowId)
   { }
 
   virtual ~StartRecordingResult() { }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     if (mOnSuccessCb.get() && nsDOMCameraManager::IsWindowStillActive(mWindowId)) {
       mOnSuccessCb->HandleEvent();
     }
     return NS_OK;
   }
@@ -447,17 +448,17 @@ public:
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
   virtual ~StartRecordingTask()
   {
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     DOM_CAMERA_LOGT("%s:%d\n", __func__, __LINE__);
     nsresult rv = mCameraControl->StartRecordingImpl(this);
     DOM_CAMERA_LOGT("%s:%d : result %d\n", __func__, __LINE__, rv);
 
     // dispatch the callback
     nsCOMPtr<nsIRunnable> startRecordingResult;
     if (NS_SUCCEEDED(rv)) {
@@ -491,17 +492,17 @@ public:
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
   virtual ~StopRecordingTask()
   {
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     DOM_CAMERA_LOGT("%s:%d\n", __func__, __LINE__);
     nsresult rv = mCameraControl->StopRecordingImpl(this);
     DOM_CAMERA_LOGT("%s:%d\n", __func__, __LINE__);
 
     NS_ENSURE_SUCCESS(rv, rv);
     return NS_OK;
   }
@@ -520,17 +521,17 @@ public:
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
   virtual ~StartPreviewTask()
   {
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     DOM_CAMERA_LOGT("%s:%d\n", __func__, __LINE__);
     nsresult rv = mCameraControl->StartPreviewImpl(this);
     DOM_CAMERA_LOGT("%s:%d\n", __func__, __LINE__);
 
     NS_ENSURE_SUCCESS(rv, rv);
     return NS_OK;
   }
@@ -549,17 +550,17 @@ public:
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
   virtual ~StopPreviewTask()
   {
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     DOM_CAMERA_LOGT("%s:%d\n", __func__, __LINE__);
     mCameraControl->StopPreviewImpl(this);
     DOM_CAMERA_LOGT("%s:%d\n", __func__, __LINE__);
 
     return NS_OK;
   }
 
@@ -572,17 +573,17 @@ class GetPreviewStreamVideoModeTask : pu
 public:
   GetPreviewStreamVideoModeTask(CameraControlImpl* aCameraControl, idl::CameraRecorderOptions aOptions,  nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError)
     : mCameraControl(aCameraControl)
     , mOptions(aOptions)
     , mOnSuccessCb(new nsMainThreadPtrHolder<nsICameraPreviewStreamCallback>(onSuccess))
     , mOnErrorCb(new nsMainThreadPtrHolder<nsICameraErrorCallback>(onError))
   { }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     DOM_CAMERA_LOGI("%s:%d -- BEFORE IMPL\n", __func__, __LINE__);
     nsresult rv = mCameraControl->GetPreviewStreamVideoModeImpl(this);
     DOM_CAMERA_LOGI("%s:%d -- AFTER IMPL : rv = %d\n", __func__, __LINE__, rv);
 
     if (NS_FAILED(rv)) {
       nsCOMPtr<nsIRunnable> cameraErrorResult = new CameraErrorResult(mOnErrorCb, NS_LITERAL_STRING("FAILURE"), mCameraControl->GetWindowId());
       rv = NS_DispatchToMainThread(cameraErrorResult);
@@ -608,17 +609,17 @@ public:
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
   virtual ~ReleaseHardwareResult()
   {
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     if (mOnSuccessCb.get() && nsDOMCameraManager::IsWindowStillActive(mWindowId)) {
       mOnSuccessCb->HandleEvent();
     }
     return NS_OK;
   }
@@ -640,17 +641,17 @@ public:
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
   virtual ~ReleaseHardwareTask()
   {
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     DOM_CAMERA_LOGT("%s:%d\n", __func__, __LINE__);
     nsresult rv = mCameraControl->ReleaseHardwareImpl(this);
     DOM_CAMERA_LOGT("%s:%d\n", __func__, __LINE__);
 
     if (NS_FAILED(rv)) {
       nsCOMPtr<nsIRunnable> cameraErrorResult = new CameraErrorResult(mOnErrorCb, NS_LITERAL_STRING("FAILURE"), mCameraControl->GetWindowId());
       rv = NS_DispatchToMainThread(cameraErrorResult);
@@ -671,17 +672,17 @@ public:
   CameraRecorderStateChange(nsMainThreadPtrHandle<nsICameraRecorderStateChange> onStateChange, const nsString& aStateMsg, int32_t aStatus, int32_t aTrackNumber, uint64_t aWindowId)
     : mOnStateChangeCb(onStateChange)
     , mStateMsg(aStateMsg)
     , mStatus(aStatus)
     , mTrackNumber(aTrackNumber)
     , mWindowId(aWindowId)
   { }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     if (mOnStateChangeCb.get() && nsDOMCameraManager::IsWindowStillActive(mWindowId)) {
       // For now, just pass the state message and swallow mStatus and mTrackNumber
       mOnStateChangeCb->HandleStateChange(mStateMsg);
     }
     return NS_OK;
--- a/dom/camera/DOMCameraManager.h
+++ b/dom/camera/DOMCameraManager.h
@@ -76,17 +76,17 @@ class GetCameraTask : public nsRunnable
 public:
   GetCameraTask(uint32_t aCameraId, nsICameraGetCameraCallback* onSuccess, nsICameraErrorCallback* onError, nsIThread* aCameraThread)
     : mCameraId(aCameraId)
     , mOnSuccessCb(onSuccess)
     , mOnErrorCb(onError)
     , mCameraThread(aCameraThread)
   { }
 
-  NS_IMETHOD Run();
+  NS_IMETHOD Run() MOZ_OVERRIDE;
 
 protected:
   uint32_t mCameraId;
   nsCOMPtr<nsICameraGetCameraCallback> mOnSuccessCb;
   nsCOMPtr<nsICameraErrorCallback> mOnErrorCb;
   nsCOMPtr<nsIThread> mCameraThread;
 };
 
--- a/dom/devicestorage/DeviceStorageRequestParent.h
+++ b/dom/devicestorage/DeviceStorageRequestParent.h
@@ -1,16 +1,17 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_devicestorage_DeviceStorageRequestParent_h
 #define mozilla_dom_devicestorage_DeviceStorageRequestParent_h
 
+#include "mozilla/Attributes.h"
 #include "mozilla/dom/devicestorage/PDeviceStorageRequestParent.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/ContentParent.h"
 
 #include "nsThreadUtils.h"
 #include "nsDeviceStorage.h"
 #include "nsTArray.h"
 
@@ -45,17 +46,17 @@ private:
       : mParent(aParent)
     {
       mCanceled = !(mParent->AddRunnable(this));
     }
 
     virtual ~CancelableRunnable() {
     }
 
-    NS_IMETHOD Run() {
+    NS_IMETHOD Run() MOZ_OVERRIDE {
       nsresult rv = NS_OK;
       if (!mCanceled) {
         rv = CancelableRun();
         mParent->RemoveRunnable(this);
       }
       return rv;
     }
 
--- a/dom/devicestorage/nsDeviceStorage.h
+++ b/dom/devicestorage/nsDeviceStorage.h
@@ -1,16 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsDeviceStorage_h
 #define nsDeviceStorage_h
 
 class nsPIDOMWindow;
+#include "mozilla/Attributes.h"
 #include "PCOMContentPermissionRequestChild.h"
 
 #include "DOMRequest.h"
 #include "DOMCursor.h"
 #include "nsAutoPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDOMClassInfoID.h"
 #include "nsIClassInfo.h"
@@ -67,17 +68,17 @@ public:
     public:
       InvalidateRunnable(DeviceStorageUsedSpaceCache* aCache, 
                          const nsAString& aStorageName)
         : mCache(aCache)
         , mStorageName(aStorageName) {}
 
       ~InvalidateRunnable() {}
 
-      NS_IMETHOD Run()
+      NS_IMETHOD Run() MOZ_OVERRIDE
       {
         mozilla::RefPtr<DeviceStorageUsedSpaceCache::CacheEntry> cacheEntry;
         cacheEntry = mCache->GetCacheEntry(mStorageName);
         if (cacheEntry) {
           cacheEntry->mDirty = true;
         }
         return NS_OK;
       }
@@ -164,17 +165,17 @@ private:
 class ContinueCursorEvent MOZ_FINAL : public nsRunnable
 {
 public:
   ContinueCursorEvent(already_AddRefed<mozilla::dom::DOMRequest> aRequest);
   ContinueCursorEvent(mozilla::dom::DOMRequest* aRequest);
   ~ContinueCursorEvent();
   void Continue();
 
-  NS_IMETHOD Run();
+  NS_IMETHOD Run() MOZ_OVERRIDE;
 private:
   already_AddRefed<DeviceStorageFile> GetNextFile();
   nsRefPtr<mozilla::dom::DOMRequest> mRequest;
 };
 
 class nsDOMDeviceStorageCursor MOZ_FINAL
   : public mozilla::dom::DOMCursor
   , public nsIContentPermissionRequest
@@ -194,22 +195,22 @@ public:
                            DeviceStorageFile* aFile,
                            PRTime aSince);
 
 
   nsTArray<nsRefPtr<DeviceStorageFile> > mFiles;
   bool mOkToCallContinue;
   PRTime mSince;
 
-  virtual bool Recv__delete__(const bool& allow);
-  virtual void IPDLRelease();
+  virtual bool Recv__delete__(const bool& allow) MOZ_OVERRIDE;
+  virtual void IPDLRelease() MOZ_OVERRIDE;
 
   void GetStorageType(nsAString & aType);
 
-  void RequestComplete();
+  void RequestComplete() MOZ_OVERRIDE;
 
 private:
   ~nsDOMDeviceStorageCursor();
 
   nsRefPtr<DeviceStorageFile> mFile;
   nsCOMPtr<nsIPrincipal> mPrincipal;
 };
 
--- a/dom/file/ArchiveRequest.h
+++ b/dom/file/ArchiveRequest.h
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_file_domarchiverequest_h__
 #define mozilla_dom_file_domarchiverequest_h__
 
+#include "mozilla/Attributes.h"
 #include "ArchiveReader.h"
 #include "DOMRequest.h"
 
 #include "FileCommon.h"
 
 
 BEGIN_FILE_NAMESPACE
 
@@ -35,17 +36,17 @@ public:
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ArchiveRequest, DOMRequest)
 
   ArchiveRequest(nsIDOMWindow* aWindow,
                  ArchiveReader* aReader);
 
   // nsIDOMEventTarget
-  virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor);
+  virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor) MOZ_OVERRIDE;
 
 public:
   // This is called by the DOMArchiveRequestEvent
   void Run();
 
   // Set the types for this request
   void OpGetFilenames();
   void OpGetFile(const nsAString& aFilename);
--- a/dom/file/ArchiveZipEvent.h
+++ b/dom/file/ArchiveZipEvent.h
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_file_domarchivezipevent_h__
 #define mozilla_dom_file_domarchivezipevent_h__
 
+#include "mozilla/Attributes.h"
 #include "ArchiveEvent.h"
 
 #include "FileCommon.h"
 #include "zipstruct.h"
 
 #include "DictionaryHelpers.h"
 
 BEGIN_FILE_NAMESPACE
@@ -22,20 +23,20 @@ BEGIN_FILE_NAMESPACE
 class ArchiveZipItem : public ArchiveItem
 {
 public:
   ArchiveZipItem(const char* aFilename,
                  const ZipCentral& aCentralStruct,
                  const nsAString& aEncoding);
   virtual ~ArchiveZipItem();
 
-  nsresult GetFilename(nsString& aFilename);
+  nsresult GetFilename(nsString& aFilename) MOZ_OVERRIDE;
 
   // From zipItem to DOMFile:
-  virtual nsIDOMFile* File(ArchiveReader* aArchiveReader);
+  virtual nsIDOMFile* File(ArchiveReader* aArchiveReader) MOZ_OVERRIDE;
 
 public: // for the event
   static uint32_t StrToInt32(const uint8_t* aStr);
   static uint16_t StrToInt16(const uint8_t* aStr);
 
 private:
   nsresult ConvertFilename();
 
@@ -52,17 +53,17 @@ private: // data
  * ArchiveReaderEvent implements the ArchiveReaderEvent for the ZIP format
  */
 class ArchiveReaderZipEvent : public ArchiveReaderEvent
 {
 public:
   ArchiveReaderZipEvent(ArchiveReader* aArchiveReader,
                         const nsAString& aEncoding);
 
-  nsresult Exec();
+  nsresult Exec() MOZ_OVERRIDE;
 
 private:
   nsString mEncoding;
 };
 
 END_FILE_NAMESPACE
 
 #endif // mozilla_dom_file_domarchivezipevent_h__
--- a/dom/file/ArchiveZipFile.h
+++ b/dom/file/ArchiveZipFile.h
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_file_domarchivefile_h__
 #define mozilla_dom_file_domarchivefile_h__
 
+#include "mozilla/Attributes.h"
 #include "nsDOMFile.h"
 
 #include "ArchiveReader.h"
 
 #include "FileCommon.h"
 #include "zipstruct.h"
 
 BEGIN_FILE_NAMESPACE
@@ -52,25 +53,25 @@ public:
   }
 
   virtual ~ArchiveZipFile()
   {
     MOZ_COUNT_DTOR(ArchiveZipFile);
   }
 
   // Overrides:
-  NS_IMETHOD GetInternalStream(nsIInputStream**);
+  NS_IMETHOD GetInternalStream(nsIInputStream**) MOZ_OVERRIDE;
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ArchiveZipFile, nsDOMFileCC)
 
 protected:
   virtual already_AddRefed<nsIDOMBlob> CreateSlice(uint64_t aStart,
                                                    uint64_t aLength,
-                                                   const nsAString& aContentType);
+                                                   const nsAString& aContentType) MOZ_OVERRIDE;
 
 private: // Data
   ZipCentral mCentral;
   nsRefPtr<ArchiveReader> mArchiveReader;
 
   nsString mFilename;
 };
 
--- a/dom/file/DOMFileHandle.h
+++ b/dom/file/DOMFileHandle.h
@@ -2,35 +2,36 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_file_domfilehandle_h__
 #define mozilla_dom_file_domfilehandle_h__
 
+#include "mozilla/Attributes.h"
 #include "FileCommon.h"
 
 #include "FileHandle.h"
 
 BEGIN_FILE_NAMESPACE
 
 class DOMFileHandle : public FileHandle
 {
 public:
   static already_AddRefed<DOMFileHandle>
   Create(nsPIDOMWindow* aWindow,
          nsIFileStorage* aFileStorage,
          nsIFile* aFile);
 
   virtual already_AddRefed<nsISupports>
-  CreateStream(nsIFile* aFile, bool aReadOnly);
+  CreateStream(nsIFile* aFile, bool aReadOnly) MOZ_OVERRIDE;
 
   virtual already_AddRefed<nsIDOMFile>
-  CreateFileObject(LockedFile* aLockedFile, uint32_t aFileSize);
+  CreateFileObject(LockedFile* aLockedFile, uint32_t aFileSize) MOZ_OVERRIDE;
 
 protected:
   DOMFileHandle()
   { }
 
   ~DOMFileHandle()
   { }
 };
--- a/dom/file/File.h
+++ b/dom/file/File.h
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_file_file_h__
 #define mozilla_dom_file_file_h__
 
+#include "mozilla/Attributes.h"
 #include "FileCommon.h"
 
 #include "nsDOMFile.h"
 
 #include "LockedFile.h"
 
 BEGIN_FILE_NAMESPACE
 
@@ -43,47 +44,47 @@ public:
   {
     NS_ASSERTION(mFile, "Null file!");
     NS_ASSERTION(mLockedFile, "Null locked file!");
     mFileInfos.AppendElement(aFileInfo);
   }
 
   // Overrides
   NS_IMETHOD
-  GetMozFullPathInternal(nsAString& aFullPath);
+  GetMozFullPathInternal(nsAString& aFullPath) MOZ_OVERRIDE;
 
   NS_IMETHOD
-  GetInternalStream(nsIInputStream** aStream);
+  GetInternalStream(nsIInputStream** aStream) MOZ_OVERRIDE;
 
 protected:
   // Create slice
   File(const File* aOther, uint64_t aStart, uint64_t aLength,
        const nsAString& aContentType);
 
   virtual ~File()
   { }
 
   virtual already_AddRefed<nsIDOMBlob>
   CreateSlice(uint64_t aStart, uint64_t aLength,
-              const nsAString& aContentType);
+              const nsAString& aContentType) MOZ_OVERRIDE;
 
   virtual bool
-  IsStoredFile() const
+  IsStoredFile() const MOZ_OVERRIDE
   {
     return mStoredFile;
   }
 
   virtual bool
-  IsWholeFile() const
+  IsWholeFile() const MOZ_OVERRIDE
   {
     return mWholeFile;
   }
 
   virtual bool
-  IsSnapshot() const
+  IsSnapshot() const MOZ_OVERRIDE
   {
     return true;
   }
 
 private:
   nsCOMPtr<nsIFile> mFile;
   nsRefPtr<LockedFile> mLockedFile;
 
--- a/dom/file/FileRequest.h
+++ b/dom/file/FileRequest.h
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_file_filerequest_h__
 #define mozilla_dom_file_filerequest_h__
 
+#include "mozilla/Attributes.h"
 #include "FileCommon.h"
 
 #include "DOMRequest.h"
 
 BEGIN_FILE_NAMESPACE
 
 class FileHelper;
 class LockedFile;
@@ -22,17 +23,17 @@ public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(FileRequest, DOMRequest)
 
   static already_AddRefed<FileRequest>
   Create(nsIDOMWindow* aOwner, LockedFile* aLockedFile, bool aIsFileRequest);
 
   // nsIDOMEventTarget
   virtual nsresult
-  PreHandleEvent(nsEventChainPreVisitor& aVisitor);
+  PreHandleEvent(nsEventChainPreVisitor& aVisitor) MOZ_OVERRIDE;
 
   void
   OnProgress(uint64_t aProgress, uint64_t aProgressMax)
   {
     FireProgressEvent(aProgress, aProgressMax);
   }
 
   nsresult
--- a/dom/file/FileService.h
+++ b/dom/file/FileService.h
@@ -65,26 +65,26 @@ public:
 
 private:
   class LockedFileQueue MOZ_FINAL : public FileHelperListener
   {
     friend class FileService;
 
   public:
     NS_IMETHOD_(nsrefcnt)
-    AddRef();
+    AddRef() MOZ_OVERRIDE;
 
     NS_IMETHOD_(nsrefcnt)
-    Release();
+    Release() MOZ_OVERRIDE;
 
     inline nsresult
     Enqueue(FileHelper* aFileHelper);
 
     virtual void
-    OnFileHelperComplete(FileHelper* aFileHelper);
+    OnFileHelperComplete(FileHelper* aFileHelper) MOZ_OVERRIDE;
 
   private:
     inline
     LockedFileQueue(LockedFile* aLockedFile);
 
     nsresult
     ProcessQueue();
 
--- a/dom/file/LockedFile.h
+++ b/dom/file/LockedFile.h
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_file_lockedfile_h__
 #define mozilla_dom_file_lockedfile_h__
 
+#include "mozilla/Attributes.h"
 #include "FileCommon.h"
 
 #include "nsIDOMLockedFile.h"
 #include "nsIRunnable.h"
 
 #include "nsDOMEventTargetHelper.h"
 
 class nsIInputStream;
@@ -60,17 +61,17 @@ public:
 
   static already_AddRefed<LockedFile>
   Create(FileHandle* aFileHandle,
          Mode aMode,
          RequestMode aRequestMode = NORMAL);
 
   // nsIDOMEventTarget
   virtual nsresult
-  PreHandleEvent(nsEventChainPreVisitor& aVisitor);
+  PreHandleEvent(nsEventChainPreVisitor& aVisitor) MOZ_OVERRIDE;
 
   nsresult
   CreateParallelStream(nsISupports** aStream);
 
   nsresult
   GetOrCreateStream(nsISupports** aStream);
 
   bool
--- a/dom/file/MetadataHelper.h
+++ b/dom/file/MetadataHelper.h
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_file_metadatahelper_h__
 #define mozilla_dom_file_metadatahelper_h__
 
+#include "mozilla/Attributes.h"
 #include "FileCommon.h"
 
 #include "nsIFileStreams.h"
 
 #include "DictionaryHelpers.h"
 
 #include "AsyncHelper.h"
 #include "FileHelper.h"
@@ -85,34 +86,34 @@ public:
   MetadataHelper(LockedFile* aLockedFile,
                  FileRequest* aFileRequest,
                  MetadataParameters* aParams)
   : FileHelper(aLockedFile, aFileRequest),
     mParams(aParams)
   { }
 
   nsresult
-  DoAsyncRun(nsISupports* aStream);
+  DoAsyncRun(nsISupports* aStream) MOZ_OVERRIDE;
 
   nsresult
-  GetSuccessResult(JSContext* aCx, JS::Value* aVal);
+  GetSuccessResult(JSContext* aCx, JS::Value* aVal) MOZ_OVERRIDE;
 
 protected:
   class AsyncMetadataGetter : public AsyncHelper
   {
   public:
     AsyncMetadataGetter(nsISupports* aStream, MetadataParameters* aParams,
                         bool aReadWrite)
     : AsyncHelper(aStream),
       mParams(aParams), mReadWrite(aReadWrite)
     { }
 
   protected:
     nsresult
-    DoStreamWork(nsISupports* aStream);
+    DoStreamWork(nsISupports* aStream) MOZ_OVERRIDE;
 
   private:
     nsRefPtr<MetadataParameters> mParams;
     bool mReadWrite;
   };
 
   nsRefPtr<MetadataParameters> mParams;
 };
--- a/dom/indexedDB/IDBDatabase.h
+++ b/dom/indexedDB/IDBDatabase.h
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_indexeddb_idbdatabase_h__
 #define mozilla_dom_indexeddb_idbdatabase_h__
 
+#include "mozilla/Attributes.h"
 #include "mozilla/dom/indexedDB/IndexedDatabase.h"
 
 #include "nsIDocument.h"
 #include "nsIFileStorage.h"
 #include "nsIIDBDatabase.h"
 #include "nsIOfflineStorage.h"
 
 #include "nsDOMEventTargetHelper.h"
@@ -74,17 +75,17 @@ public:
   static IDBDatabase*
   FromStorage(nsIFileStorage* aStorage)
   {
     nsCOMPtr<nsIOfflineStorage> storage = do_QueryInterface(aStorage);
     return storage ? FromStorage(storage) : nullptr;
   }
 
   // nsIDOMEventTarget
-  virtual nsresult PostHandleEvent(nsEventChainPostVisitor& aVisitor);
+  virtual nsresult PostHandleEvent(nsEventChainPostVisitor& aVisitor) MOZ_OVERRIDE;
 
   DatabaseInfo* Info() const
   {
     return mDatabaseInfo;
   }
 
   const nsString& Name() const
   {
--- a/dom/indexedDB/IDBRequest.h
+++ b/dom/indexedDB/IDBRequest.h
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_indexeddb_idbrequest_h__
 #define mozilla_dom_indexeddb_idbrequest_h__
 
+#include "mozilla/Attributes.h"
 #include "mozilla/dom/indexedDB/IndexedDatabase.h"
 
 #include "nsIIDBRequest.h"
 #include "nsIIDBOpenDBRequest.h"
 #include "nsDOMEventTargetHelper.h"
 #include "mozilla/dom/indexedDB/IDBWrapperCache.h"
 #include "mozilla/dom/DOMError.h"
 
@@ -36,17 +37,17 @@ public:
 
   static
   already_AddRefed<IDBRequest> Create(nsISupports* aSource,
                                       IDBWrapperCache* aOwnerCache,
                                       IDBTransaction* aTransaction,
                                       JSContext* aCallingCx);
 
   // nsIDOMEventTarget
-  virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor);
+  virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor) MOZ_OVERRIDE;
 
   nsISupports* Source()
   {
     return mSource;
   }
 
   void Reset();
 
@@ -134,17 +135,17 @@ public:
   Create(IDBFactory* aFactory,
          nsPIDOMWindow* aOwner,
          JS::Handle<JSObject*> aScriptOwner,
          JSContext* aCallingCx);
 
   void SetTransaction(IDBTransaction* aTransaction);
 
   // nsIDOMEventTarget
-  virtual nsresult PostHandleEvent(nsEventChainPostVisitor& aVisitor);
+  virtual nsresult PostHandleEvent(nsEventChainPostVisitor& aVisitor) MOZ_OVERRIDE;
 
   DOMError* GetError(ErrorResult& aRv)
   {
     return IDBRequest::GetError(aRv);
   }
 
   IDBFactory*
   Factory() const
--- a/dom/indexedDB/IDBTransaction.h
+++ b/dom/indexedDB/IDBTransaction.h
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_indexeddb_idbtransaction_h__
 #define mozilla_dom_indexeddb_idbtransaction_h__
 
+#include "mozilla/Attributes.h"
 #include "mozilla/dom/indexedDB/IndexedDatabase.h"
 
 #include "mozIStorageConnection.h"
 #include "mozIStorageStatement.h"
 #include "mozIStorageFunction.h"
 #include "nsIIDBTransaction.h"
 #include "mozilla/dom/DOMError.h"
 #include "nsIRunnable.h"
@@ -93,17 +94,17 @@ public:
          Mode aMode,
          bool aDispatchDelayed)
   {
     return CreateInternal(aDatabase, aObjectStoreNames, aMode, aDispatchDelayed,
                           false);
   }
 
   // nsIDOMEventTarget
-  virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor);
+  virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor) MOZ_OVERRIDE;
 
   void OnNewRequest();
   void OnRequestFinished();
   void OnRequestDisconnected();
 
   void RemoveObjectStore(const nsAString& aName);
 
   void SetTransactionListener(IDBTransactionListener* aListener);
--- a/dom/indexedDB/ipc/IndexedDBParent.h
+++ b/dom/indexedDB/ipc/IndexedDBParent.h
@@ -92,17 +92,17 @@ public:
 
   void
   NoteDyingActor()
   {
     mActor = NULL;
   }
 
   NS_IMETHOD
-  HandleEvent(nsIDOMEvent* aEvent)
+  HandleEvent(nsIDOMEvent* aEvent) MOZ_OVERRIDE
   {
     return mActor ? mActor->HandleEvent(aEvent) : NS_OK;
   }
 
 protected:
   virtual ~WeakEventListener()
   { }
 };
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -106,20 +106,20 @@ public:
     NS_DECL_NSIOBSERVER
     NS_DECL_NSITHREADOBSERVER
     NS_DECL_NSIDOMGEOPOSITIONCALLBACK
 
     /**
      * MessageManagerCallback methods that we override.
      */
     virtual bool DoSendAsyncMessage(const nsAString& aMessage,
-                                    const mozilla::dom::StructuredCloneData& aData);
-    virtual bool CheckPermission(const nsAString& aPermission);
-    virtual bool CheckManifestURL(const nsAString& aManifestURL);
-    virtual bool CheckAppHasPermission(const nsAString& aPermission);
+                                    const mozilla::dom::StructuredCloneData& aData) MOZ_OVERRIDE;
+    virtual bool CheckPermission(const nsAString& aPermission) MOZ_OVERRIDE;
+    virtual bool CheckManifestURL(const nsAString& aManifestURL) MOZ_OVERRIDE;
+    virtual bool CheckAppHasPermission(const nsAString& aPermission) MOZ_OVERRIDE;
 
     /** Notify that a tab is beginning its destruction sequence. */
     void NotifyTabDestroying(PBrowserParent* aTab);
     /** Notify that a tab was destroyed during normal operation. */
     void NotifyTabDestroyed(PBrowserParent* aTab,
                             bool aNotifiedDestroying);
 
     TestShellParent* CreateTestShell();
@@ -162,17 +162,17 @@ public:
      * Get a user-friendly name for this ContentParent.  We make no guarantees
      * about this name: It might not be unique, apps can spoof special names,
      * etc.  So please don't use this name to make any decisions about the
      * ContentParent based on the value returned here.
      */
     void FriendlyName(nsAString& aName);
 
 protected:
-    void OnChannelConnected(int32_t pid);
+    void OnChannelConnected(int32_t pid) MOZ_OVERRIDE;
     virtual void ActorDestroy(ActorDestroyReason why);
 
 private:
     static nsDataHashtable<nsStringHashKey, ContentParent*> *sAppContentParents;
     static nsTArray<ContentParent*>* sNonAppContentParents;
     static nsTArray<ContentParent*>* sPrivateContent;
     static LinkedList<ContentParent> sContentParents;
 
--- a/dom/ipc/TabChild.h
+++ b/dom/ipc/TabChild.h
@@ -86,50 +86,50 @@ public:
                              JSContext* aCx,
                              uint8_t aArgc,
                              JS::Value* aRetval)
   {
     return mMessageManager
       ? mMessageManager->SendSyncMessage(aMessageName, aObject, aCx, aArgc, aRetval)
       : NS_ERROR_NULL_POINTER;
   }
-  NS_IMETHOD GetContent(nsIDOMWindow** aContent);
-  NS_IMETHOD GetDocShell(nsIDocShell** aDocShell);
-  NS_IMETHOD Dump(const nsAString& aStr)
+  NS_IMETHOD GetContent(nsIDOMWindow** aContent) MOZ_OVERRIDE;
+  NS_IMETHOD GetDocShell(nsIDocShell** aDocShell) MOZ_OVERRIDE;
+  NS_IMETHOD Dump(const nsAString& aStr) MOZ_OVERRIDE
   {
     return mMessageManager ? mMessageManager->Dump(aStr) : NS_OK;
   }
-  NS_IMETHOD PrivateNoteIntentionalCrash();
+  NS_IMETHOD PrivateNoteIntentionalCrash() MOZ_OVERRIDE;
   NS_IMETHOD Btoa(const nsAString& aBinaryData,
-                  nsAString& aAsciiBase64String);
+                  nsAString& aAsciiBase64String) MOZ_OVERRIDE;
   NS_IMETHOD Atob(const nsAString& aAsciiString,
-                  nsAString& aBinaryData);
+                  nsAString& aBinaryData) MOZ_OVERRIDE;
 
   NS_IMETHOD AddEventListener(const nsAString& aType,
                               nsIDOMEventListener* aListener,
                               bool aUseCapture)
   {
     // By default add listeners only for trusted events!
     return nsDOMEventTargetHelper::AddEventListener(aType, aListener,
                                                     aUseCapture, false, 2);
   }
   using nsDOMEventTargetHelper::AddEventListener;
   NS_IMETHOD AddEventListener(const nsAString& aType,
                               nsIDOMEventListener* aListener,
                               bool aUseCapture, bool aWantsUntrusted,
-                              uint8_t optional_argc)
+                              uint8_t optional_argc) MOZ_OVERRIDE
   {
     return nsDOMEventTargetHelper::AddEventListener(aType, aListener,
                                                     aUseCapture,
                                                     aWantsUntrusted,
                                                     optional_argc);
   }
 
-  virtual JSContext* GetJSContextForEventHandlers();
-  virtual nsIPrincipal* GetPrincipal();
+  virtual JSContext* GetJSContextForEventHandlers() MOZ_OVERRIDE;
+  virtual nsIPrincipal* GetPrincipal() MOZ_OVERRIDE;
 
   nsCOMPtr<nsIContentFrameMessageManager> mMessageManager;
   TabChild* mTabChild;
 };
 
 class ContentListener MOZ_FINAL : public nsIDOMEventListener
 {
 public:
--- a/dom/media/MediaManager.h
+++ b/dom/media/MediaManager.h
@@ -207,17 +207,17 @@ class GetUserMediaNotificationEvent: pub
     : mStream(aStream), mOnTracksAvailableCallback(aOnTracksAvailableCallback),
       mStatus(aStatus) {}
     virtual ~GetUserMediaNotificationEvent()
     {
 
     }
 
     NS_IMETHOD
-    Run()
+    Run() MOZ_OVERRIDE
     {
       NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
       // Make sure mStream is cleared and our reference to the DOMMediaStream
       // is dropped on the main thread, no matter what happens in this method.
       // Otherwise this object might be destroyed off the main thread,
       // releasing DOMMediaStream off the main thread, which is not allowed.
       nsRefPtr<DOMMediaStream> stream = mStream.forget();
 
@@ -286,17 +286,17 @@ public:
     {}
 
   ~MediaOperationRunnable()
   {
     // MediaStreams can be released on any thread.
   }
 
   NS_IMETHOD
-  Run()
+  Run() MOZ_OVERRIDE
   {
     SourceMediaStream *source = mListener->GetSourceStream();
     // No locking between these is required as all the callbacks for the
     // same MediaStream will occur on the same thread.
     if (!source) // means the stream was never Activated()
       return NS_OK;
 
     switch (mType) {
--- a/dom/plugins/base/nsPluginInstanceOwner.h
+++ b/dom/plugins/base/nsPluginInstanceOwner.h
@@ -2,16 +2,17 @@
 // vim:set ts=2 sts=2 sw=2 et cin:
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsPluginInstanceOwner_h_
 #define nsPluginInstanceOwner_h_
 
+#include "mozilla/Attributes.h"
 #include "npapi.h"
 #include "nsCOMPtr.h"
 #include "nsIPluginInstanceOwner.h"
 #include "nsIPluginTagInfo.h"
 #include "nsIPrivacyTransitionObserver.h"
 #include "nsIDOMEventListener.h"
 #include "nsPluginHost.h"
 #include "nsPluginNativeWindow.h"
@@ -55,29 +56,29 @@ public:
   virtual ~nsPluginInstanceOwner();
   
   NS_DECL_ISUPPORTS
   NS_DECL_NSIPLUGININSTANCEOWNER
   NS_DECL_NSIPRIVACYTRANSITIONOBSERVER
   
   NS_IMETHOD GetURL(const char *aURL, const char *aTarget,
                     nsIInputStream *aPostStream, 
-                    void *aHeadersData, uint32_t aHeadersDataLen);
+                    void *aHeadersData, uint32_t aHeadersDataLen) MOZ_OVERRIDE;
   
-  NS_IMETHOD ShowStatus(const PRUnichar *aStatusMsg);
+  NS_IMETHOD ShowStatus(const PRUnichar *aStatusMsg) MOZ_OVERRIDE;
   
-  NPError    ShowNativeContextMenu(NPMenu* menu, void* event);
+  NPError    ShowNativeContextMenu(NPMenu* menu, void* event) MOZ_OVERRIDE;
   
   NPBool     ConvertPoint(double sourceX, double sourceY, NPCoordinateSpace sourceSpace,
-                          double *destX, double *destY, NPCoordinateSpace destSpace);
+                          double *destX, double *destY, NPCoordinateSpace destSpace) MOZ_OVERRIDE;
   
   virtual NPError InitAsyncSurface(NPSize *size, NPImageFormat format,
-                                   void *initData, NPAsyncSurface *surface);
-  virtual NPError FinalizeAsyncSurface(NPAsyncSurface *surface);
-  virtual void SetCurrentAsyncSurface(NPAsyncSurface *surface, NPRect *changed);
+                                   void *initData, NPAsyncSurface *surface) MOZ_OVERRIDE;
+  virtual NPError FinalizeAsyncSurface(NPAsyncSurface *surface) MOZ_OVERRIDE;
+  virtual void SetCurrentAsyncSurface(NPAsyncSurface *surface, NPRect *changed) MOZ_OVERRIDE;
 
   //nsIPluginTagInfo interface
   NS_DECL_NSIPLUGINTAGINFO
   
   // nsIDOMEventListener interfaces 
   NS_DECL_NSIDOMEVENTLISTENER
   
   nsresult ProcessMouseDown(nsIDOMEvent* aKeyEvent);
--- a/dom/plugins/base/nsPluginTags.h
+++ b/dom/plugins/base/nsPluginTags.h
@@ -1,16 +1,17 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsPluginTags_h_
 #define nsPluginTags_h_
 
+#include "mozilla/Attributes.h"
 #include "nscore.h"
 #include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
 #include "nsCOMArray.h"
 #include "nsIPluginTag.h"
 #include "nsNPAPIPluginInstance.h"
 #include "nsITimer.h"
 #include "nsIDOMMimeType.h"
@@ -105,36 +106,36 @@ public:
     CopyUTF8toUTF16(aTag->mMimeDescriptions[aMimeTypeIndex], mDescription);
     CopyUTF8toUTF16(aTag->mExtensions[aMimeTypeIndex], mSuffixes);
     CopyUTF8toUTF16(aTag->mMimeTypes[aMimeTypeIndex], mType);
   }
 
   virtual ~DOMMimeTypeImpl() {
   }
 
-  NS_METHOD GetDescription(nsAString& aDescription)
+  NS_METHOD GetDescription(nsAString& aDescription) MOZ_OVERRIDE
   {
     aDescription.Assign(mDescription);
     return NS_OK;
   }
 
-  NS_METHOD GetEnabledPlugin(nsIDOMPlugin** aEnabledPlugin)
+  NS_METHOD GetEnabledPlugin(nsIDOMPlugin** aEnabledPlugin) MOZ_OVERRIDE
   {
     // this has to be implemented by the DOM version.
     *aEnabledPlugin = nullptr;
     return NS_OK;
   }
 
-  NS_METHOD GetSuffixes(nsAString& aSuffixes)
+  NS_METHOD GetSuffixes(nsAString& aSuffixes) MOZ_OVERRIDE
   {
     aSuffixes.Assign(mSuffixes);
     return NS_OK;
   }
 
-  NS_METHOD GetType(nsAString& aType)
+  NS_METHOD GetType(nsAString& aType) MOZ_OVERRIDE
   {
     aType.Assign(mType);
     return NS_OK;
   }
 private:
   nsString mDescription;
   nsString mSuffixes;
   nsString mType;
--- a/dom/plugins/ipc/PluginProcessParent.h
+++ b/dom/plugins/ipc/PluginProcessParent.h
@@ -2,16 +2,17 @@
  * vim: sw=4 ts=4 et :
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef dom_plugins_PluginProcessParent_h
 #define dom_plugins_PluginProcessParent_h 1
 
+#include "mozilla/Attributes.h"
 #include "base/basictypes.h"
 
 #include "base/file_path.h"
 #include "base/scoped_ptr.h"
 #include "base/thread.h"
 #include "base/waitable_event.h"
 #include "chrome/common/child_process_host.h"
 
@@ -30,17 +31,17 @@ public:
     /**
      * Synchronously launch the plugin process. If the process fails to launch
      * after timeoutMs, this method will return false.
      */
     bool Launch(int32_t timeoutMs);
 
     void Delete();
 
-    virtual bool CanShutdown()
+    virtual bool CanShutdown() MOZ_OVERRIDE
     {
         return true;
     }
 
     const std::string& GetPluginFilePath() { return mPluginFilePath; }
 
     using mozilla::ipc::GeckoChildProcessHost::GetShutDownEvent;
     using mozilla::ipc::GeckoChildProcessHost::GetChannel;
--- a/dom/src/events/nsJSEventListener.h
+++ b/dom/src/events/nsJSEventListener.h
@@ -1,16 +1,17 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsJSEventListener_h__
 #define nsJSEventListener_h__
 
+#include "mozilla/Attributes.h"
 #include "nsIDOMKeyEvent.h"
 #include "nsIJSEventListener.h"
 #include "nsIDOMEventListener.h"
 #include "jsapi.h"
 #include "nsCOMPtr.h"
 #include "nsIAtom.h"
 #include "nsIScriptContext.h"
 #include "nsCycleCollectionParticipant.h"
@@ -27,17 +28,17 @@ public:
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
 
   // nsIDOMEventListener interface
   NS_DECL_NSIDOMEVENTLISTENER
 
   // nsIJSEventListener
 
-  virtual size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const
+  virtual size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const MOZ_OVERRIDE
   {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 
   NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(nsJSEventListener)
 
 protected:
   virtual void UpdateScopeObject(JS::Handle<JSObject*> aScopeObject);
--- a/dom/src/geolocation/nsGeolocation.h
+++ b/dom/src/geolocation/nsGeolocation.h
@@ -78,18 +78,18 @@ class nsGeolocationRequest
   bool WantsHighAccuracy() {return mOptions && mOptions->enableHighAccuracy;}
   bool IsActive() {return !mCleared;}
   bool Allowed() {return mAllowed;}
   void SetTimeoutTimer();
   nsIPrincipal* GetPrincipal();
 
   ~nsGeolocationRequest();
 
-  bool Recv__delete__(const bool& allow);
-  void IPDLRelease() { Release(); }
+  virtual bool Recv__delete__(const bool& allow) MOZ_OVERRIDE;
+  virtual void IPDLRelease() MOZ_OVERRIDE { Release(); }
 
   int32_t WatchId() { return mWatchId; }
  private:
 
   void NotifyError(int16_t errorCode);
   bool mAllowed;
   bool mCleared;
   bool mIsWatchPositionRequest;
--- a/dom/src/jsurl/nsJSProtocolHandler.h
+++ b/dom/src/jsurl/nsJSProtocolHandler.h
@@ -1,16 +1,17 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsJSProtocolHandler_h___
 #define nsJSProtocolHandler_h___
 
+#include "mozilla/Attributes.h"
 #include "nsIProtocolHandler.h"
 #include "nsITextToSubURI.h"
 #include "nsIURI.h"
 #include "nsIMutable.h"
 #include "nsISerializable.h"
 #include "nsIClassInfo.h"
 #include "nsSimpleURI.h"
 
@@ -73,28 +74,28 @@ public:
     nsIURI* GetBaseURI() const
     {
         return mBaseURI;
     }
 
     NS_DECL_ISUPPORTS_INHERITED
 
     // nsIURI overrides
-    virtual nsSimpleURI* StartClone(RefHandlingEnum refHandlingMode);
+    virtual nsSimpleURI* StartClone(RefHandlingEnum refHandlingMode) MOZ_OVERRIDE;
 
     // nsISerializable overrides
-    NS_IMETHOD Read(nsIObjectInputStream* aStream);
-    NS_IMETHOD Write(nsIObjectOutputStream* aStream);
+    NS_IMETHOD Read(nsIObjectInputStream* aStream) MOZ_OVERRIDE;
+    NS_IMETHOD Write(nsIObjectOutputStream* aStream) MOZ_OVERRIDE;
 
     // Override the nsIClassInfo method GetClassIDNoAlloc to make sure our
     // nsISerializable impl works right.
-    NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc);
+    NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) MOZ_OVERRIDE;
     //NS_IMETHOD QueryInterface( const nsIID& aIID, void** aInstancePtr );
 
 protected:
     virtual nsresult EqualsInternal(nsIURI* other,
                                     RefHandlingEnum refHandlingMode,
-                                    bool* result);
+                                    bool* result) MOZ_OVERRIDE;
 private:
     nsCOMPtr<nsIURI> mBaseURI;
 };
 
 #endif /* nsJSProtocolHandler_h___ */
--- a/dom/src/notification/DesktopNotification.h
+++ b/dom/src/notification/DesktopNotification.h
@@ -151,39 +151,39 @@ class DesktopNotificationRequest : publi
 {
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICONTENTPERMISSIONREQUEST
 
   DesktopNotificationRequest(DesktopNotification* notification)
     : mDesktopNotification(notification) {}
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() MOZ_OVERRIDE
   {
     nsCOMPtr<nsIContentPermissionPrompt> prompt =
       do_CreateInstance(NS_CONTENT_PERMISSION_PROMPT_CONTRACTID);
     if (prompt) {
       prompt->Prompt(this);
     }
     return NS_OK;
   }
 
   ~DesktopNotificationRequest()
   {
   }
 
- bool Recv__delete__(const bool& allow)
+ virtual bool Recv__delete__(const bool& allow) MOZ_OVERRIDE
  {
    if (allow)
      (void) Allow();
    else
      (void) Cancel();
    return true;
  }
- void IPDLRelease() { Release(); }
+ virtual void IPDLRelease() MOZ_OVERRIDE { Release(); }
 
   nsRefPtr<DesktopNotification> mDesktopNotification;
 };
 
 class AlertServiceObserver: public nsIObserver
 {
  public:
   NS_DECL_ISUPPORTS
--- a/dom/src/storage/DOMStorage.h
+++ b/dom/src/storage/DOMStorage.h
@@ -1,16 +1,17 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsDOMStorage_h___
 #define nsDOMStorage_h___
 
+#include "mozilla/Attributes.h"
 #include "nsIDOMStorage.h"
 #include "nsPIDOMStorage.h"
 #include "nsWeakReference.h"
 #include "nsAutoPtr.h"
 
 namespace mozilla {
 namespace dom {
 
@@ -20,25 +21,25 @@ class DOMStorageCache;
 class DOMStorage MOZ_FINAL : public nsIDOMStorage
                            , public nsPIDOMStorage
                            , public nsSupportsWeakReference
 {
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOMSTORAGE
 
   // nsPIDOMStorage
-  virtual StorageType GetType() const;
-  virtual DOMStorageManager* GetManager() const { return mManager; }
-  virtual const DOMStorageCache* GetCache() const { return mCache; }
+  virtual StorageType GetType() const MOZ_OVERRIDE;
+  virtual DOMStorageManager* GetManager() const MOZ_OVERRIDE { return mManager; }
+  virtual const DOMStorageCache* GetCache() const MOZ_OVERRIDE { return mCache; }
 
-  virtual nsTArray<nsString>* GetKeys();
-  virtual nsIPrincipal* GetPrincipal();
-  virtual bool PrincipalEquals(nsIPrincipal* aPrincipal);
-  virtual bool CanAccess(nsIPrincipal* aPrincipal);
-  virtual bool IsPrivate() { return mIsPrivate; }
+  virtual nsTArray<nsString>* GetKeys() MOZ_OVERRIDE;
+  virtual nsIPrincipal* GetPrincipal() MOZ_OVERRIDE;
+  virtual bool PrincipalEquals(nsIPrincipal* aPrincipal) MOZ_OVERRIDE;
+  virtual bool CanAccess(nsIPrincipal* aPrincipal) MOZ_OVERRIDE;
+  virtual bool IsPrivate() MOZ_OVERRIDE { return mIsPrivate; }
 
   DOMStorage(DOMStorageManager* aManager,
              DOMStorageCache* aCache,
              const nsAString& aDocumentURI,
              nsIPrincipal* aPrincipal,
              bool aIsPrivate);
   ~DOMStorage();
 
--- a/dom/workers/FileReaderSync.h
+++ b/dom/workers/FileReaderSync.h
@@ -48,14 +48,14 @@ public:
                           ErrorResult& aRv);
   void ReadAsText(JS::Handle<JSObject*> aBlob,
                   const Optional<nsAString>& aEncoding,
                   nsAString& aResult, ErrorResult& aRv);
   void ReadAsDataURL(JS::Handle<JSObject*> aBlob, nsAString& aResult,
                      ErrorResult& aRv);
 
   // From nsICharsetDetectionObserver
-  NS_IMETHOD Notify(const char *aCharset, nsDetectionConfident aConf);
+  NS_IMETHOD Notify(const char *aCharset, nsDetectionConfident aConf) MOZ_OVERRIDE;
 };
 
 END_WORKERS_NAMESPACE
 
 #endif // mozilla_dom_workers_filereadersync_h__
--- a/dom/workers/WorkerPrivate.h
+++ b/dom/workers/WorkerPrivate.h
@@ -1,16 +1,17 @@
 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_workers_workerprivate_h__
 #define mozilla_dom_workers_workerprivate_h__
 
+#include "mozilla/Attributes.h"
 #include "Workers.h"
 
 #include "nsIContentSecurityPolicy.h"
 #include "nsIRunnable.h"
 #include "nsIThread.h"
 #include "nsIThreadInternal.h"
 #include "nsPIDOMWindow.h"
 
@@ -128,17 +129,17 @@ protected:
                    aClearingBehavior),
     mSyncQueueKey(aSyncQueueKey), mBypassSyncQueue(aBypassSyncQueue)
   { }
 
   virtual ~WorkerSyncRunnable()
   { }
 
   virtual bool
-  DispatchInternal();
+  DispatchInternal() MOZ_OVERRIDE;
 };
 
 class MainThreadSyncRunnable : public WorkerSyncRunnable
 {
 public:
   MainThreadSyncRunnable(WorkerPrivate* aWorkerPrivate,
                          ClearingBehavior aClearingBehavior,
                          uint32_t aSyncQueueKey,
@@ -171,17 +172,17 @@ protected:
                         BusyBehavior aBusyBehavior)
   : WorkerRunnable(aWorkerPrivate, aTarget, aBusyBehavior, SkipWhenClearing)
   { }
 
   virtual ~WorkerControlRunnable()
   { }
 
   virtual bool
-  DispatchInternal();
+  DispatchInternal() MOZ_OVERRIDE;
 };
 
 // SharedMutex is a small wrapper around an (internal) reference-counted Mutex
 // object. It exists to avoid changing a lot of code to use Mutex* instead of
 // Mutex&.
 class SharedMutex
 {
   typedef mozilla::Mutex Mutex;