Bug 702877 - Replace NS_OVERRIDE with MOZ_OVERRIDE. r=ehsan
authorJoshua Cranmer <Pidgeot18@gmail.com>
Fri, 06 Jul 2012 13:15:45 -0500
changeset 105688 950048a5830253cf3611c82ed6d4e475c16a2dab
parent 105687 33321a15636fbe8cac6d828e409832ec022c0619
child 105689 fc4f105722ef11c244ee7f98c0aa6825ca84ad2d
push id1490
push userakeybl@mozilla.com
push dateMon, 08 Oct 2012 18:29:50 +0000
treeherdermozilla-beta@f335e7dacdc1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs702877
milestone17.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 702877 - Replace NS_OVERRIDE with MOZ_OVERRIDE. r=ehsan
chrome/src/nsChromeRegistryChrome.h
chrome/src/nsChromeRegistryContent.h
content/smil/nsSMILCSSValueType.h
content/smil/nsSMILSetAnimationFunction.h
content/svg/content/src/SVGMotionSMILAnimationFunction.h
dom/ipc/ContentChild.h
dom/ipc/ContentParent.h
dom/ipc/ContentProcess.h
dom/ipc/TabChild.h
dom/ipc/TabParent.h
dom/plugins/base/PluginPRLibrary.h
dom/plugins/ipc/BrowserStreamChild.h
dom/plugins/ipc/BrowserStreamParent.h
dom/plugins/ipc/ChildAsyncCall.h
dom/plugins/ipc/PluginBackgroundDestroyer.h
dom/plugins/ipc/PluginInstanceChild.h
dom/plugins/ipc/PluginInstanceParent.h
dom/plugins/ipc/PluginModuleChild.h
dom/plugins/ipc/PluginModuleParent.h
dom/plugins/ipc/PluginProcessChild.h
dom/plugins/ipc/PluginStreamChild.h
dom/plugins/ipc/PluginStreamParent.h
dom/plugins/ipc/StreamNotifyChild.h
dom/sms/src/ipc/SmsChild.h
dom/sms/src/ipc/SmsParent.h
gfx/layers/ipc/ShadowLayerChild.h
gfx/layers/ipc/ShadowLayerParent.h
gfx/thebes/gfxImageSurface.h
hal/sandbox/SandboxHal.cpp
ipc/glue/AsyncChannel.h
ipc/glue/RPCChannel.h
ipc/glue/SharedMemory.h
ipc/glue/SharedMemoryBasic_android.h
ipc/glue/SharedMemoryBasic_chromium.h
ipc/glue/SharedMemorySysV.h
ipc/glue/SyncChannel.h
ipc/ipdl/test/cxx/TestBadActor.h
ipc/ipdl/test/cxx/TestBlockChild.h
ipc/ipdl/test/cxx/TestBridgeMain.h
ipc/ipdl/test/cxx/TestCrashCleanup.h
ipc/ipdl/test/cxx/TestDataStructures.h
ipc/ipdl/test/cxx/TestDesc.h
ipc/ipdl/test/cxx/TestFailedCtor.h
ipc/ipdl/test/cxx/TestHangs.h
ipc/ipdl/test/cxx/TestJSON.h
ipc/ipdl/test/cxx/TestLatency.h
ipc/ipdl/test/cxx/TestManyChildAllocs.h
ipc/ipdl/test/cxx/TestMultiMgrs.h
ipc/ipdl/test/cxx/TestNestedLoops.h
ipc/ipdl/test/cxx/TestOpens.h
ipc/ipdl/test/cxx/TestRPCErrorCleanup.h
ipc/ipdl/test/cxx/TestRPCRaces.h
ipc/ipdl/test/cxx/TestRPCShutdownRace.h
ipc/ipdl/test/cxx/TestRaceDeferral.h
ipc/ipdl/test/cxx/TestRacyRPCReplies.h
ipc/ipdl/test/cxx/TestRacyReentry.h
ipc/ipdl/test/cxx/TestRacyUndefer.h
ipc/ipdl/test/cxx/TestSanity.h
ipc/ipdl/test/cxx/TestSelfManageRoot.h
ipc/ipdl/test/cxx/TestShmem.h
ipc/ipdl/test/cxx/TestShutdown.h
ipc/ipdl/test/cxx/TestStackHooks.h
ipc/ipdl/test/cxx/TestSyncError.h
ipc/ipdl/test/cxx/TestSyncHang.h
ipc/ipdl/test/cxx/TestSyncWakeup.h
ipc/ipdl/test/cxx/TestSysVShmem.h
layout/ipc/RenderFrameChild.h
layout/ipc/RenderFrameParent.h
netwerk/protocol/ftp/FTPChannelChild.h
netwerk/protocol/ftp/FTPChannelParent.h
xpcom/base/nscore.h
xpcom/components/nsNativeComponentLoader.h
xpcom/tests/static-checker/override-global.cpp
xpcom/tests/static-checker/override-namespace-typedef.cpp
xpcom/tests/static-checker/override-pass.cpp
xpcom/tests/static-checker/override-signature.cpp
xpcom/tests/static-checker/override-static.cpp
xpcom/tests/static-checker/override-virtual.cpp
--- a/chrome/src/nsChromeRegistryChrome.h
+++ b/chrome/src/nsChromeRegistryChrome.h
@@ -17,50 +17,50 @@ class PContentParent;
 class nsIPrefBranch;
 
 class nsChromeRegistryChrome : public nsChromeRegistry
 {
  public:
   nsChromeRegistryChrome();
   ~nsChromeRegistryChrome();
 
-  NS_OVERRIDE nsresult Init();
+  nsresult Init() MOZ_OVERRIDE;
 
-  NS_OVERRIDE NS_IMETHOD CheckForNewChrome();
-  NS_OVERRIDE NS_IMETHOD CheckForOSAccessibility();
-  NS_OVERRIDE NS_IMETHOD GetLocalesForPackage(const nsACString& aPackage,
-                                              nsIUTF8StringEnumerator* *aResult);
-  NS_OVERRIDE NS_IMETHOD IsLocaleRTL(const nsACString& package,
-                                     bool *aResult);
-  NS_OVERRIDE NS_IMETHOD GetSelectedLocale(const nsACString& aPackage,
-                                           nsACString& aLocale);
-  NS_OVERRIDE NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic,
-                                 const PRUnichar *someData);
+  NS_IMETHOD CheckForNewChrome() MOZ_OVERRIDE;
+  NS_IMETHOD CheckForOSAccessibility() MOZ_OVERRIDE;
+  NS_IMETHOD GetLocalesForPackage(const nsACString& aPackage,
+                                  nsIUTF8StringEnumerator* *aResult) MOZ_OVERRIDE;
+  NS_IMETHOD IsLocaleRTL(const nsACString& package,
+                         bool *aResult) MOZ_OVERRIDE;
+  NS_IMETHOD GetSelectedLocale(const nsACString& aPackage,
+                               nsACString& aLocale) MOZ_OVERRIDE;
+  NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic,
+                     const PRUnichar *someData) MOZ_OVERRIDE;
 
 #ifdef MOZ_XUL
-  NS_OVERRIDE NS_IMETHOD GetXULOverlays(nsIURI *aURI,
-                                        nsISimpleEnumerator **_retval);
-  NS_OVERRIDE NS_IMETHOD GetStyleOverlays(nsIURI *aURI,
-                                          nsISimpleEnumerator **_retval);
+  NS_IMETHOD GetXULOverlays(nsIURI *aURI,
+                            nsISimpleEnumerator **_retval) MOZ_OVERRIDE;
+  NS_IMETHOD GetStyleOverlays(nsIURI *aURI,
+                              nsISimpleEnumerator **_retval) MOZ_OVERRIDE;
 #endif
   
   void SendRegisteredChrome(mozilla::dom::PContentParent* aChild);
 
  private:
   static PLDHashOperator CollectPackages(PLDHashTable *table,
                                          PLDHashEntryHdr *entry,
                                          PRUint32 number, void *arg);
 
   nsresult SelectLocaleFromPref(nsIPrefBranch* prefs);
-  NS_OVERRIDE nsresult UpdateSelectedLocale();
-  NS_OVERRIDE nsIURI* GetBaseURIFromPackage(const nsCString& aPackage,
-                                             const nsCString& aProvider,
-                                             const nsCString& aPath);
-  NS_OVERRIDE nsresult GetFlagsFromPackage(const nsCString& aPackage,
-                                           PRUint32* aFlags);
+  nsresult UpdateSelectedLocale() MOZ_OVERRIDE;
+  nsIURI* GetBaseURIFromPackage(const nsCString& aPackage,
+                                 const nsCString& aProvider,
+                                 const nsCString& aPath) MOZ_OVERRIDE;
+  nsresult GetFlagsFromPackage(const nsCString& aPackage,
+                               PRUint32* aFlags) MOZ_OVERRIDE;
 
   static const PLDHashTableOps kTableOps;
   static PLDHashNumber HashKey(PLDHashTable *table, const void *key);
   static bool          MatchKey(PLDHashTable *table, const PLDHashEntryHdr *entry,
                                 const void *key);
   static void          ClearEntry(PLDHashTable *table, PLDHashEntryHdr *entry);
   static bool          InitEntry(PLDHashTable *table, PLDHashEntryHdr *entry,
                                  const void *key);
--- a/chrome/src/nsChromeRegistryContent.h
+++ b/chrome/src/nsChromeRegistryContent.h
@@ -20,30 +20,30 @@ class nsChromeRegistryContent : public n
  public:
   nsChromeRegistryContent();
   
   void RegisterRemoteChrome(const nsTArray<ChromePackage>& aPackages,
                             const nsTArray<ResourceMapping>& aResources,
                             const nsTArray<OverrideMapping>& aOverrides,
                             const nsACString& aLocale);
 
-  NS_OVERRIDE NS_IMETHOD GetLocalesForPackage(const nsACString& aPackage,
-                                              nsIUTF8StringEnumerator* *aResult);
-  NS_OVERRIDE NS_IMETHOD CheckForNewChrome();
-  NS_OVERRIDE NS_IMETHOD CheckForOSAccessibility();
-  NS_OVERRIDE NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic,
-                                 const PRUnichar* aData);
-  NS_OVERRIDE NS_IMETHOD IsLocaleRTL(const nsACString& package,
-                                     bool *aResult);
-  NS_OVERRIDE NS_IMETHOD GetSelectedLocale(const nsACString& aPackage,
-                                           nsACString& aLocale);
-  NS_OVERRIDE NS_IMETHOD GetStyleOverlays(nsIURI *aChromeURL,
-                                          nsISimpleEnumerator **aResult);
-  NS_OVERRIDE NS_IMETHOD GetXULOverlays(nsIURI *aChromeURL,
-                                        nsISimpleEnumerator **aResult);
+  NS_IMETHOD GetLocalesForPackage(const nsACString& aPackage,
+                                  nsIUTF8StringEnumerator* *aResult) MOZ_OVERRIDE;
+  NS_IMETHOD CheckForNewChrome() MOZ_OVERRIDE;
+  NS_IMETHOD CheckForOSAccessibility() MOZ_OVERRIDE;
+  NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic,
+                     const PRUnichar* aData) MOZ_OVERRIDE;
+  NS_IMETHOD IsLocaleRTL(const nsACString& package,
+                         bool *aResult) MOZ_OVERRIDE;
+  NS_IMETHOD GetSelectedLocale(const nsACString& aPackage,
+                               nsACString& aLocale) MOZ_OVERRIDE;
+  NS_IMETHOD GetStyleOverlays(nsIURI *aChromeURL,
+                              nsISimpleEnumerator **aResult) MOZ_OVERRIDE;
+  NS_IMETHOD GetXULOverlays(nsIURI *aChromeURL,
+                            nsISimpleEnumerator **aResult) MOZ_OVERRIDE;
 
  private:
   struct PackageEntry
   {
     PackageEntry() : flags(0) { }
     ~PackageEntry() { }
 
     nsCOMPtr<nsIURI> contentBaseURI;
@@ -51,21 +51,21 @@ class nsChromeRegistryContent : public n
     nsCOMPtr<nsIURI> skinBaseURI;
     PRUint32         flags;
   };
   
   void RegisterPackage(const ChromePackage& aPackage);
   void RegisterResource(const ResourceMapping& aResource);
   void RegisterOverride(const OverrideMapping& aOverride);
 
-  NS_OVERRIDE nsresult UpdateSelectedLocale();
-  NS_OVERRIDE nsIURI* GetBaseURIFromPackage(const nsCString& aPackage,
-                                 const nsCString& aProvider,
-                                 const nsCString& aPath);
-  NS_OVERRIDE nsresult GetFlagsFromPackage(const nsCString& aPackage, PRUint32* aFlags);
+  nsresult UpdateSelectedLocale() MOZ_OVERRIDE;
+  nsIURI* GetBaseURIFromPackage(const nsCString& aPackage,
+                     const nsCString& aProvider,
+                     const nsCString& aPath) MOZ_OVERRIDE;
+  nsresult GetFlagsFromPackage(const nsCString& aPackage, PRUint32* aFlags) MOZ_OVERRIDE;
 
   nsClassHashtable<nsCStringHashKey, PackageEntry> mPackagesHash;
   nsCString mLocale;
 
   virtual void ManifestContent(ManifestProcessingContext& cx, int lineno,
                                char *const * argv, bool platform,
                                bool contentaccessible);
   virtual void ManifestLocale(ManifestProcessingContext& cx, int lineno,
--- a/content/smil/nsSMILCSSValueType.h
+++ b/content/smil/nsSMILCSSValueType.h
@@ -5,17 +5,17 @@
 
 /* representation of a value for a SMIL-animated CSS property */
 
 #ifndef NS_SMILCSSVALUETYPE_H_
 #define NS_SMILCSSVALUETYPE_H_
 
 #include "nsISMILType.h"
 #include "nsCSSProperty.h"
-#include "nscore.h" // For NS_OVERRIDE
+#include "mozilla/Attributes.h"
 
 class nsAString;
 
 namespace mozilla {
 namespace dom {
 class Element;
 } // namespace dom
 } // namespace mozilla
@@ -29,32 +29,32 @@ public:
   typedef mozilla::dom::Element Element;
 
   // Singleton for nsSMILValue objects to hold onto.
   static nsSMILCSSValueType sSingleton;
 
 protected:
   // nsISMILType Methods
   // -------------------
-  NS_OVERRIDE virtual void     Init(nsSMILValue& aValue) const;
-  NS_OVERRIDE virtual void     Destroy(nsSMILValue&) const;
-  NS_OVERRIDE virtual nsresult Assign(nsSMILValue& aDest,
-                                      const nsSMILValue& aSrc) const;
-  NS_OVERRIDE virtual bool     IsEqual(const nsSMILValue& aLeft,
-                                       const nsSMILValue& aRight) const;
-  NS_OVERRIDE virtual nsresult Add(nsSMILValue& aDest,
-                                   const nsSMILValue& aValueToAdd,
-                                   PRUint32 aCount) const;
-  NS_OVERRIDE virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
-                                               const nsSMILValue& aTo,
-                                               double& aDistance) const;
-  NS_OVERRIDE virtual nsresult Interpolate(const nsSMILValue& aStartVal,
-                                           const nsSMILValue& aEndVal,
-                                           double aUnitDistance,
-                                           nsSMILValue& aResult) const;
+  virtual void     Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
+  virtual void     Destroy(nsSMILValue&) const MOZ_OVERRIDE;
+  virtual nsresult Assign(nsSMILValue& aDest,
+                          const nsSMILValue& aSrc) const MOZ_OVERRIDE;
+  virtual bool     IsEqual(const nsSMILValue& aLeft,
+                           const nsSMILValue& aRight) const MOZ_OVERRIDE;
+  virtual nsresult Add(nsSMILValue& aDest,
+                       const nsSMILValue& aValueToAdd,
+                       PRUint32 aCount) const MOZ_OVERRIDE;
+  virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
+                                   const nsSMILValue& aTo,
+                                   double& aDistance) const MOZ_OVERRIDE;
+  virtual nsresult Interpolate(const nsSMILValue& aStartVal,
+                               const nsSMILValue& aEndVal,
+                               double aUnitDistance,
+                               nsSMILValue& aResult) const MOZ_OVERRIDE;
 
 public:
   // Helper Methods
   // --------------
   /**
    * Sets up the given nsSMILValue to represent the given string value.  The
    * string is interpreted as a value for the given property on the given
    * element.
--- a/content/smil/nsSMILSetAnimationFunction.h
+++ b/content/smil/nsSMILSetAnimationFunction.h
@@ -34,33 +34,33 @@ public:
                          nsAttrValue& aResult, nsresult* aParseResult = nsnull);
 
   /*
    * Unsets the given attribute.
    *
    * @returns true if aAttribute is a recognized animation-related
    *          attribute; false otherwise.
    */
-  NS_OVERRIDE virtual bool UnsetAttr(nsIAtom* aAttribute);
+  virtual bool UnsetAttr(nsIAtom* aAttribute) MOZ_OVERRIDE;
 
 protected:
   // Although <set> animation might look like to-animation, unlike to-animation,
   // it never interpolates values.
   // Returning false here will mean this animation function gets treated as
   // a single-valued function and no interpolation will be attempted.
-  NS_OVERRIDE virtual bool IsToAnimation() const {
+  virtual bool IsToAnimation() const MOZ_OVERRIDE {
     return false;
   }
 
   // <set> applies the exact same value across the simple duration.
-  NS_OVERRIDE virtual bool IsValueFixedForSimpleDuration() const {
+  virtual bool IsValueFixedForSimpleDuration() const MOZ_OVERRIDE {
     return true;
   }
-  NS_OVERRIDE virtual bool               HasAttr(nsIAtom* aAttName) const;
-  NS_OVERRIDE virtual const nsAttrValue* GetAttr(nsIAtom* aAttName) const;
-  NS_OVERRIDE virtual bool               GetAttr(nsIAtom* aAttName,
-                                                 nsAString& aResult) const;
-  NS_OVERRIDE virtual bool WillReplace() const;
+  virtual bool               HasAttr(nsIAtom* aAttName) const MOZ_OVERRIDE;
+  virtual const nsAttrValue* GetAttr(nsIAtom* aAttName) const MOZ_OVERRIDE;
+  virtual bool               GetAttr(nsIAtom* aAttName,
+                                     nsAString& aResult) const MOZ_OVERRIDE;
+  virtual bool WillReplace() const MOZ_OVERRIDE;
 
   bool IsDisallowedAttribute(const nsIAtom* aAttribute) const;
 };
 
 #endif // NS_SMILSETANIMATIONFUNCTION_H_
--- a/content/svg/content/src/SVGMotionSMILAnimationFunction.h
+++ b/content/svg/content/src/SVGMotionSMILAnimationFunction.h
@@ -26,21 +26,21 @@ namespace mozilla {
 //
 // Subclass of nsSMILAnimationFunction to support a few extra features offered
 // by the <animateMotion> element.
 //
 class SVGMotionSMILAnimationFunction : public nsSMILAnimationFunction
 {
 public:
   SVGMotionSMILAnimationFunction();
-  NS_OVERRIDE virtual bool SetAttr(nsIAtom* aAttribute,
-                                     const nsAString& aValue,
-                                     nsAttrValue& aResult,
-                                     nsresult* aParseResult = nsnull);
-  NS_OVERRIDE virtual bool UnsetAttr(nsIAtom* aAttribute);
+  virtual bool SetAttr(nsIAtom* aAttribute,
+                       const nsAString& aValue,
+                       nsAttrValue& aResult,
+                       nsresult* aParseResult = nsnull) MOZ_OVERRIDE;
+  virtual bool UnsetAttr(nsIAtom* aAttribute) MOZ_OVERRIDE;
 
   // Method to allow our owner-element to signal us when our <mpath>
   // has changed or been added/removed.  When that happens, we need to
   // mark ourselves as changed so we'll get recomposed, and mark our path data
   // as stale so it'll get regenerated (regardless of mPathSourceType, since
   // <mpath> trumps all the other sources of path data)
   void MpathChanged() { mIsPathStale = mHasChanged = true; }
 
@@ -51,22 +51,22 @@ protected:
     ePathSourceType_None,      // uninitialized or not applicable
     ePathSourceType_ByAttr,    // by or from-by animation
     ePathSourceType_ToAttr,    // to or from-to animation
     ePathSourceType_ValuesAttr,
     ePathSourceType_PathAttr,
     ePathSourceType_Mpath
   };
 
-  NS_OVERRIDE virtual nsSMILCalcMode GetCalcMode() const;
-  NS_OVERRIDE virtual nsresult GetValues(const nsISMILAttr& aSMILAttr,
-                                         nsSMILValueArray& aResult);
-  NS_OVERRIDE virtual void CheckValueListDependentAttrs(PRUint32 aNumValues);
+  virtual nsSMILCalcMode GetCalcMode() const MOZ_OVERRIDE;
+  virtual nsresult GetValues(const nsISMILAttr& aSMILAttr,
+                             nsSMILValueArray& aResult) MOZ_OVERRIDE;
+  virtual void CheckValueListDependentAttrs(PRUint32 aNumValues) MOZ_OVERRIDE;
 
-  NS_OVERRIDE virtual bool IsToAnimation() const;
+  virtual bool IsToAnimation() const MOZ_OVERRIDE;
 
   void     CheckKeyPoints();
   nsresult SetKeyPoints(const nsAString& aKeyPoints, nsAttrValue& aResult);
   void     UnsetKeyPoints();
   nsresult SetRotate(const nsAString& aRotate, nsAttrValue& aResult);
   void     UnsetRotate();
 
   // Helpers for GetValues
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -71,18 +71,18 @@ public:
     virtual bool DeallocPDeviceStorageRequest(PDeviceStorageRequestChild*);
 
     virtual PCrashReporterChild*
     AllocPCrashReporter(const mozilla::dom::NativeThreadId& id,
                         const PRUint32& processType);
     virtual bool
     DeallocPCrashReporter(PCrashReporterChild*);
 
-    NS_OVERRIDE virtual PHalChild* AllocPHal();
-    NS_OVERRIDE virtual bool DeallocPHal(PHalChild*);
+    virtual PHalChild* AllocPHal() MOZ_OVERRIDE;
+    virtual bool DeallocPHal(PHalChild*) MOZ_OVERRIDE;
 
     virtual PIndexedDBChild* AllocPIndexedDB();
     virtual bool DeallocPIndexedDB(PIndexedDBChild* aActor);
 
     virtual PMemoryReportRequestChild*
     AllocPMemoryReportRequest();
 
     virtual bool
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -141,18 +141,18 @@ private:
 
     virtual PCrashReporterParent* AllocPCrashReporter(const NativeThreadId& tid,
                                                       const PRUint32& processType);
     virtual bool DeallocPCrashReporter(PCrashReporterParent* crashreporter);
     virtual bool RecvPCrashReporterConstructor(PCrashReporterParent* actor,
                                                const NativeThreadId& tid,
                                                const PRUint32& processType);
 
-    NS_OVERRIDE virtual PHalParent* AllocPHal();
-    NS_OVERRIDE virtual bool DeallocPHal(PHalParent*);
+    virtual PHalParent* AllocPHal() MOZ_OVERRIDE;
+    virtual bool DeallocPHal(PHalParent*) MOZ_OVERRIDE;
 
     virtual PIndexedDBParent* AllocPIndexedDB();
 
     virtual bool DeallocPIndexedDB(PIndexedDBParent* aActor);
 
     virtual bool
     RecvPIndexedDBConstructor(PIndexedDBParent* aActor);
 
--- a/dom/ipc/ContentProcess.h
+++ b/dom/ipc/ContentProcess.h
@@ -28,20 +28,18 @@ class ContentProcess : public mozilla::i
 public:
     ContentProcess(ProcessHandle mParentHandle)
         : ProcessChild(mParentHandle)
     { }
 
     ~ContentProcess()
     { }
 
-    NS_OVERRIDE
-    virtual bool Init();
-    NS_OVERRIDE
-    virtual void CleanUp();
+    virtual bool Init() MOZ_OVERRIDE;
+    virtual void CleanUp() MOZ_OVERRIDE;
 
 private:
     ContentChild mContent;
     mozilla::ipc::ScopedXREEmbed mXREEmbed;
 
     DISALLOW_EVIL_CONSTRUCTORS(ContentProcess);
 };
 
--- a/dom/ipc/TabChild.h
+++ b/dom/ipc/TabChild.h
@@ -254,25 +254,22 @@ public:
 
     void SetBackgroundColor(const nscolor& aColor);
 
     void NotifyPainted();
 
     bool IsAsyncPanZoomEnabled();
 
 protected:
-    NS_OVERRIDE
     virtual PRenderFrameChild* AllocPRenderFrame(ScrollingBehavior* aScrolling,
                                                  LayersBackend* aBackend,
                                                  int32_t* aMaxTextureSize,
-                                                 uint64_t* aLayersId);
-    NS_OVERRIDE
-    virtual bool DeallocPRenderFrame(PRenderFrameChild* aFrame);
-    NS_OVERRIDE
-    virtual bool RecvDestroy();
+                                                 uint64_t* aLayersId) MOZ_OVERRIDE;
+    virtual bool DeallocPRenderFrame(PRenderFrameChild* aFrame) MOZ_OVERRIDE;
+    virtual bool RecvDestroy() MOZ_OVERRIDE;
 
     nsEventStatus DispatchWidgetEvent(nsGUIEvent& event);
 
     virtual PIndexedDBChild* AllocPIndexedDB(const nsCString& aASCIIOrigin,
                                              bool* /* aAllowed */);
 
     virtual bool DeallocPIndexedDB(PIndexedDBChild* aActor);
 
--- a/dom/ipc/TabParent.h
+++ b/dom/ipc/TabParent.h
@@ -207,23 +207,21 @@ protected:
       nsCString mFeatures;
       nsCOMPtr<nsIDialogParamBlock> mParams;
     };
     InfallibleTArray<DelayedDialogData*> mDelayedDialogs;
 
     bool ShouldDelayDialogs();
     bool AllowContentIME();
 
-    NS_OVERRIDE
     virtual PRenderFrameParent* AllocPRenderFrame(ScrollingBehavior* aScrolling,
                                                   LayersBackend* aBackend,
                                                   int32_t* aMaxTextureSize,
-                                                  uint64_t* aLayersId);
-    NS_OVERRIDE
-    virtual bool DeallocPRenderFrame(PRenderFrameParent* aFrame);
+                                                  uint64_t* aLayersId) MOZ_OVERRIDE;
+    virtual bool DeallocPRenderFrame(PRenderFrameParent* aFrame) MOZ_OVERRIDE;
 
     // IME
     static TabParent *mIMETabParent;
     nsString mIMECacheText;
     PRUint32 mIMESelectionAnchor;
     PRUint32 mIMESelectionFocus;
     bool mIMEComposing;
     bool mIMECompositionEnding;
--- a/dom/plugins/base/PluginPRLibrary.h
+++ b/dom/plugins/base/PluginPRLibrary.h
@@ -107,28 +107,25 @@ public:
 
     virtual nsresult NPP_ClearSiteData(const char* site, uint64_t flags,
                                        uint64_t maxAge);
     virtual nsresult NPP_GetSitesWithData(InfallibleTArray<nsCString>& result);
 
     virtual nsresult AsyncSetWindow(NPP instance, NPWindow* window);
     virtual nsresult GetImageContainer(NPP instance, ImageContainer** aContainer);
     virtual nsresult GetImageSize(NPP instance, nsIntSize* aSize);
-    NS_OVERRIDE virtual bool UseAsyncPainting() { return false; }
+    virtual bool UseAsyncPainting() MOZ_OVERRIDE { return false; }
 #if defined(XP_MACOSX)
     virtual nsresult IsRemoteDrawingCoreAnimation(NPP instance, bool *aDrawing);
 #endif
-    NS_OVERRIDE
-    virtual nsresult SetBackgroundUnknown(NPP instance);
-    NS_OVERRIDE
+    virtual nsresult SetBackgroundUnknown(NPP instance) MOZ_OVERRIDE;
     virtual nsresult BeginUpdateBackground(NPP instance,
-                                           const nsIntRect&, gfxContext** aCtx);
-    NS_OVERRIDE
+                                           const nsIntRect&, gfxContext** aCtx) MOZ_OVERRIDE;
     virtual nsresult EndUpdateBackground(NPP instance,
-                                         gfxContext* aCtx, const nsIntRect&);
+                                         gfxContext* aCtx, const nsIntRect&) MOZ_OVERRIDE;
 #if defined(MOZ_WIDGET_QT) && (MOZ_PLATFORM_MAEMO == 6)
     virtual nsresult HandleGUIEvent(NPP instance,
                                     const nsGUIEvent& anEvent, bool* handled);
 #endif
 
     virtual void GetLibraryPath(nsACString& aPath) { aPath.Assign(mFilePath); }
 
 private:
--- a/dom/plugins/ipc/BrowserStreamChild.h
+++ b/dom/plugins/ipc/BrowserStreamChild.h
@@ -25,17 +25,17 @@ public:
                      StreamNotifyChild* notifyData,
                      const nsCString& headers,
                      const nsCString& mimeType,
                      const bool& seekable,
                      NPError* rv,
                      uint16_t* stype);
   virtual ~BrowserStreamChild();
 
-  NS_OVERRIDE virtual bool IsBrowserStream() { return true; }
+  virtual bool IsBrowserStream() MOZ_OVERRIDE { return true; }
 
   NPError StreamConstructed(
             const nsCString& mimeType,
             const bool& seekable,
             uint16_t* stype);
 
   virtual bool RecvWrite(const int32_t& offset,
                          const Buffer& data,
--- a/dom/plugins/ipc/BrowserStreamParent.h
+++ b/dom/plugins/ipc/BrowserStreamParent.h
@@ -19,17 +19,17 @@ class BrowserStreamParent : public PBrow
   friend class PluginModuleParent;
   friend class PluginInstanceParent;
 
 public:
   BrowserStreamParent(PluginInstanceParent* npp,
                       NPStream* stream);
   virtual ~BrowserStreamParent();
 
-  NS_OVERRIDE virtual bool IsBrowserStream() { return true; }
+  virtual bool IsBrowserStream() MOZ_OVERRIDE { return true; }
 
   virtual bool AnswerNPN_RequestRead(const IPCByteRanges& ranges,
                                      NPError* result);
 
   virtual bool RecvNPN_DestroyStream(const NPReason& reason);
 
   virtual bool RecvStreamDestroyed();
 
--- a/dom/plugins/ipc/ChildAsyncCall.h
+++ b/dom/plugins/ipc/ChildAsyncCall.h
@@ -19,18 +19,18 @@ typedef void (*PluginThreadCallback)(voi
 class PluginInstanceChild;
 
 class ChildAsyncCall : public CancelableTask
 {
 public:
   ChildAsyncCall(PluginInstanceChild* instance,
                  PluginThreadCallback aFunc, void* aUserData);
 
-  NS_OVERRIDE void Run();
-  NS_OVERRIDE void Cancel();
+  void Run() MOZ_OVERRIDE;
+  void Cancel() MOZ_OVERRIDE;
   
 protected:
   PluginInstanceChild* mInstance;
   PluginThreadCallback mFunc;
   void* mData;
 
   void RemoveFromAsyncList();
 };
--- a/dom/plugins/ipc/PluginBackgroundDestroyer.h
+++ b/dom/plugins/ipc/PluginBackgroundDestroyer.h
@@ -26,18 +26,17 @@ class PluginBackgroundDestroyerParent : 
 public:
     PluginBackgroundDestroyerParent(gfxASurface* aDyingBackground)
       : mDyingBackground(aDyingBackground)
     { }
 
     virtual ~PluginBackgroundDestroyerParent() { }
 
 private:
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         switch(why) {
         case Deletion:
         case AncestorDeletion:
             if (gfxSharedImageSurface::IsSharedImage(mDyingBackground)) {
                 gfxSharedImageSurface* s =
                     static_cast<gfxSharedImageSurface*>(mDyingBackground.get());
                 DeallocShmem(s->GetShmem());
@@ -59,17 +58,16 @@ private:
  */
 class PluginBackgroundDestroyerChild : public PPluginBackgroundDestroyerChild {
 public:
     PluginBackgroundDestroyerChild() { }
     virtual ~PluginBackgroundDestroyerChild() { }
 
 private:
     // Implementing this for good hygiene.
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     { }
 };
 
 } // namespace plugins
 } // namespace mozilla
 
 #endif  // dom_plugins_PluginBackgroundDestroyer
--- a/dom/plugins/ipc/PluginInstanceChild.h
+++ b/dom/plugins/ipc/PluginInstanceChild.h
@@ -107,39 +107,37 @@ protected:
         return new PPluginSurfaceChild();
     }
 
     virtual bool DeallocPPluginSurface(PPluginSurfaceChild* s) {
         delete s;
         return true;
     }
 
-    NS_OVERRIDE
     virtual bool
-    AnswerPaint(const NPRemoteEvent& event, int16_t* handled)
+    AnswerPaint(const NPRemoteEvent& event, int16_t* handled) MOZ_OVERRIDE
     {
         PaintTracker pt;
         return AnswerNPP_HandleEvent(event, handled);
     }
 
-    NS_OVERRIDE
     virtual bool
-    RecvWindowPosChanged(const NPRemoteEvent& event);
+    RecvWindowPosChanged(const NPRemoteEvent& event) MOZ_OVERRIDE;
 
     virtual bool
     AnswerNPP_Destroy(NPError* result);
 
     virtual PPluginScriptableObjectChild*
     AllocPPluginScriptableObject();
 
     virtual bool
     DeallocPPluginScriptableObject(PPluginScriptableObjectChild* aObject);
 
-    NS_OVERRIDE virtual bool
-    RecvPPluginScriptableObjectConstructor(PPluginScriptableObjectChild* aActor);
+    virtual bool
+    RecvPPluginScriptableObjectConstructor(PPluginScriptableObjectChild* aActor) MOZ_OVERRIDE;
 
     virtual PBrowserStreamChild*
     AllocPBrowserStream(const nsCString& url,
                         const uint32_t& length,
                         const uint32_t& lastmodified,
                         PStreamNotifyChild* notifyData,
                         const nsCString& headers,
                         const nsCString& mimeType,
@@ -172,18 +170,18 @@ protected:
     DeallocPPluginStream(PPluginStreamChild* stream);
 
     virtual PStreamNotifyChild*
     AllocPStreamNotify(const nsCString& url, const nsCString& target,
                        const bool& post, const nsCString& buffer,
                        const bool& file,
                        NPError* result);
 
-    NS_OVERRIDE virtual bool
-    DeallocPStreamNotify(PStreamNotifyChild* notifyData);
+    virtual bool
+    DeallocPStreamNotify(PStreamNotifyChild* notifyData) MOZ_OVERRIDE;
 
     virtual bool
     AnswerSetPluginFocus();
 
     virtual bool
     AnswerUpdateWindow();
 
     virtual bool
@@ -242,31 +240,27 @@ private:
     NPError
     InternalGetNPObjectForValue(NPNVariable aValue,
                                 NPObject** aObject);
 
     bool IsAsyncDrawing();
 
     NPError DeallocateAsyncBitmapSurface(NPAsyncSurface *aSurface);
 
-    NS_OVERRIDE
     virtual bool RecvUpdateBackground(const SurfaceDescriptor& aBackground,
-                                      const nsIntRect& aRect);
+                                      const nsIntRect& aRect) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual PPluginBackgroundDestroyerChild*
-    AllocPPluginBackgroundDestroyer();
+    AllocPPluginBackgroundDestroyer() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool
-    RecvPPluginBackgroundDestroyerConstructor(PPluginBackgroundDestroyerChild* aActor);
+    RecvPPluginBackgroundDestroyerConstructor(PPluginBackgroundDestroyerChild* aActor) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool
-    DeallocPPluginBackgroundDestroyer(PPluginBackgroundDestroyerChild* aActor);
+    DeallocPPluginBackgroundDestroyer(PPluginBackgroundDestroyerChild* aActor) MOZ_OVERRIDE;
 
 #if defined(OS_WIN)
     static bool RegisterWindowClass();
     bool CreatePluginWindow();
     void DestroyPluginWindow();
     void ReparentPluginWindow(HWND hWndParent);
     void SizePluginWindow(int width, int height);
     int16_t WinlessHandleEvent(NPEvent& event);
@@ -329,17 +323,17 @@ private:
           : ChildAsyncCall(aInst, nsnull, nsnull),
           mWnd(aWnd),
           mMsg(aMsg),
           mWParam(aWParam),
           mLParam(aLParam),
           mWindowed(isWindowed)
         {}
 
-        NS_OVERRIDE void Run();
+        void Run() MOZ_OVERRIDE;
 
         WNDPROC GetProc();
         HWND GetWnd() { return mWnd; }
         UINT GetMsg() { return mMsg; }
         WPARAM GetWParam() { return mWParam; }
         LPARAM GetLParam() { return mLParam; }
 
       private:
--- a/dom/plugins/ipc/PluginInstanceParent.h
+++ b/dom/plugins/ipc/PluginInstanceParent.h
@@ -48,23 +48,23 @@ public:
                          const nsCString& mimeType,
                          const NPNetscapeFuncs* npniface);
 
     virtual ~PluginInstanceParent();
 
     bool Init();
     NPError Destroy();
 
-    NS_OVERRIDE virtual void ActorDestroy(ActorDestroyReason why);
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
     virtual PPluginScriptableObjectParent*
     AllocPPluginScriptableObject();
 
-    NS_OVERRIDE virtual bool
-    RecvPPluginScriptableObjectConstructor(PPluginScriptableObjectParent* aActor);
+    virtual bool
+    RecvPPluginScriptableObjectConstructor(PPluginScriptableObjectParent* aActor) MOZ_OVERRIDE;
 
     virtual bool
     DeallocPPluginScriptableObject(PPluginScriptableObjectParent* aObject);
     virtual PBrowserStreamParent*
     AllocPBrowserStream(const nsCString& url,
                         const uint32_t& length,
                         const uint32_t& lastmodified,
                         PStreamNotifyParent* notifyData,
@@ -134,23 +134,23 @@ public:
                       NPError* result);
 
     virtual PStreamNotifyParent*
     AllocPStreamNotify(const nsCString& url, const nsCString& target,
                        const bool& post, const nsCString& buffer,
                        const bool& file,
                        NPError* result);
 
-    NS_OVERRIDE virtual bool
+    virtual bool
     AnswerPStreamNotifyConstructor(PStreamNotifyParent* actor,
                                    const nsCString& url,
                                    const nsCString& target,
                                    const bool& post, const nsCString& buffer,
                                    const bool& file,
-                                   NPError* result);
+                                   NPError* result) MOZ_OVERRIDE;
 
     virtual bool
     DeallocPStreamNotify(PStreamNotifyParent* notifyData);
 
     virtual bool
     RecvNPN_InvalidateRect(const NPRect& rect);
 
     // Async rendering
@@ -168,58 +168,58 @@ public:
     DeallocPPluginSurface(PPluginSurfaceParent* s);
 
     virtual bool
     AnswerNPN_PushPopupsEnabledState(const bool& aState);
 
     virtual bool
     AnswerNPN_PopPopupsEnabledState();
 
-    NS_OVERRIDE virtual bool
+    virtual bool
     AnswerNPN_GetValueForURL(const NPNURLVariable& variable,
                              const nsCString& url,
-                             nsCString* value, NPError* result);
+                             nsCString* value, NPError* result) MOZ_OVERRIDE;
 
-    NS_OVERRIDE virtual bool
+    virtual bool
     AnswerNPN_SetValueForURL(const NPNURLVariable& variable,
                              const nsCString& url,
-                             const nsCString& value, NPError* result);
+                             const nsCString& value, NPError* result) MOZ_OVERRIDE;
 
-    NS_OVERRIDE virtual bool
+    virtual bool
     AnswerNPN_GetAuthenticationInfo(const nsCString& protocol,
                                     const nsCString& host,
                                     const int32_t& port,
                                     const nsCString& scheme,
                                     const nsCString& realm,
                                     nsCString* username,
                                     nsCString* password,
-                                    NPError* result);
+                                    NPError* result) MOZ_OVERRIDE;
 
-    NS_OVERRIDE virtual bool
+    virtual bool
     AnswerNPN_ConvertPoint(const double& sourceX,
                            const bool&   ignoreDestX,
                            const double& sourceY,
                            const bool&   ignoreDestY,
                            const NPCoordinateSpace& sourceSpace,
                            const NPCoordinateSpace& destSpace,
                            double *destX,
                            double *destY,
-                           bool *result);
+                           bool *result) MOZ_OVERRIDE;
 
     virtual bool
     AnswerNPN_InitAsyncSurface(const gfxIntSize& size,
                                const NPImageFormat& format,
                                NPRemoteAsyncSurface* surfData,
                                bool* result);
 
     virtual bool
     RecvRedrawPlugin();
 
-    NS_OVERRIDE virtual bool
-    RecvNegotiatedCarbon();
+    virtual bool
+    RecvNegotiatedCarbon() MOZ_OVERRIDE;
 
     virtual bool RecvReleaseDXGISharedSurface(const DXGISharedSurfaceHandle &aHandle);
 
     NPError NPP_SetWindow(const NPWindow* aWindow);
 
     NPError NPP_GetValue(NPPVariable variable, void* retval);
     NPError NPP_SetValue(NPNVariable variable, void* value);
 
@@ -287,23 +287,21 @@ private:
     // |aSize|.  Return true if successful.
     bool CreateBackground(const nsIntSize& aSize);
     void DestroyBackground();
     SurfaceDescriptor BackgroundDescriptor() /*const*/;
 
     typedef mozilla::layers::ImageContainer ImageContainer;
     ImageContainer *GetImageContainer();
 
-    NS_OVERRIDE
     virtual PPluginBackgroundDestroyerParent*
-    AllocPPluginBackgroundDestroyer();
+    AllocPPluginBackgroundDestroyer() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool
-    DeallocPPluginBackgroundDestroyer(PPluginBackgroundDestroyerParent* aActor);
+    DeallocPPluginBackgroundDestroyer(PPluginBackgroundDestroyerParent* aActor) MOZ_OVERRIDE;
 
     bool InternalGetValueForNPObject(NPNVariable aVariable,
                                      PPluginScriptableObjectParent** aValue,
                                      NPError* aResult);
 
     bool IsAsyncDrawing();
 
 private:
--- a/dom/plugins/ipc/PluginModuleChild.h
+++ b/dom/plugins/ipc/PluginModuleChild.h
@@ -73,25 +73,23 @@ static const int kNestedLoopDetectorInte
 
 class PluginScriptableObjectChild;
 class PluginInstanceChild;
 
 class PluginModuleChild : public PPluginModuleChild
 {
     typedef mozilla::dom::PCrashReporterChild PCrashReporterChild;
 protected:
-    NS_OVERRIDE
     virtual mozilla::ipc::RPCChannel::RacyRPCPolicy
-    MediateRPCRace(const Message& parent, const Message& child)
+    MediateRPCRace(const Message& parent, const Message& child) MOZ_OVERRIDE
     {
         return MediateRace(parent, child);
     }
 
-    NS_OVERRIDE
-    virtual bool ShouldContinueFromReplyTimeout();
+    virtual bool ShouldContinueFromReplyTimeout() MOZ_OVERRIDE;
 
     // Implement the PPluginModuleChild interface
     virtual bool AnswerNP_GetEntryPoints(NPError* rv);
     virtual bool AnswerNP_Initialize(const uint32_t& aFlags, NPError* rv);
 
     virtual PPluginIdentifierChild*
     AllocPPluginIdentifier(const nsCString& aString,
                            const int32_t& aInt,
@@ -158,18 +156,18 @@ protected:
                                     mozilla::dom::NativeThreadId* id,
                                     PRUint32* processType);
 
     virtual void
     ActorDestroy(ActorDestroyReason why);
 
     MOZ_NORETURN void QuickExit();
 
-    NS_OVERRIDE virtual bool
-    RecvProcessNativeEventsInRPCCall();
+    virtual bool
+    RecvProcessNativeEventsInRPCCall() MOZ_OVERRIDE;
 
 public:
     PluginModuleChild();
     virtual ~PluginModuleChild();
 
     // aPluginFilename is UTF8, not native-charset!
     bool Init(const std::string& aPluginFilename,
               base::ProcessHandle aParentProcessHandle,
@@ -305,26 +303,22 @@ private:
     }
     void InitQuirksModes(const nsCString& aMimeType);
     bool InitGraphics();
     void DeinitGraphics();
 #if defined(MOZ_WIDGET_GTK)
     static gboolean DetectNestedEventLoop(gpointer data);
     static gboolean ProcessBrowserEvents(gpointer data);
 
-    NS_OVERRIDE
-    virtual void EnteredCxxStack();
-    NS_OVERRIDE
-    virtual void ExitedCxxStack();
+    virtual void EnteredCxxStack() MOZ_OVERRIDE;
+    virtual void ExitedCxxStack() MOZ_OVERRIDE;
 #elif defined(MOZ_WIDGET_QT)
 
-    NS_OVERRIDE
-    virtual void EnteredCxxStack();
-    NS_OVERRIDE
-    virtual void ExitedCxxStack();
+    virtual void EnteredCxxStack() MOZ_OVERRIDE;
+    virtual void ExitedCxxStack() MOZ_OVERRIDE;
 #endif
 
     PRLibrary* mLibrary;
     nsCString mPluginFilename; // UTF8
     nsCString mUserAgent;
     int mQuirks;
     bool mAsyncDrawingAllowed;
 
@@ -424,20 +418,18 @@ public: // called by PluginInstanceChild
      * associated with that instance.
      */
     void FindNPObjectsForInstance(PluginInstanceChild* instance);
 
 private:
     static PLDHashOperator CollectForInstance(NPObjectData* d, void* userArg);
 
 #if defined(OS_WIN)
-    NS_OVERRIDE
-    virtual void EnteredCall();
-    NS_OVERRIDE
-    virtual void ExitedCall();
+    virtual void EnteredCall() MOZ_OVERRIDE;
+    virtual void ExitedCall() MOZ_OVERRIDE;
 
     // Entered/ExitedCall notifications keep track of whether the plugin has
     // entered a nested event loop within this RPC call.
     struct IncallFrame
     {
         IncallFrame()
             : _spinning(false)
             , _savedNestableTasksAllowed(false)
--- a/dom/plugins/ipc/PluginModuleParent.h
+++ b/dom/plugins/ipc/PluginModuleParent.h
@@ -88,22 +88,22 @@ protected:
     virtual bool
     DeallocPPluginInstance(PPluginInstanceParent* aActor);
 
 public:
     // aFilePath is UTF8, not native!
     PluginModuleParent(const char* aFilePath);
     virtual ~PluginModuleParent();
 
-    NS_OVERRIDE virtual void SetPlugin(nsNPAPIPlugin* plugin)
+    virtual void SetPlugin(nsNPAPIPlugin* plugin) MOZ_OVERRIDE
     {
         mPlugin = plugin;
     }
 
-    NS_OVERRIDE virtual void ActorDestroy(ActorDestroyReason why);
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
     /**
      * LoadModule
      *
      * This may or may not launch a plugin child process,
      * and may or may not be very expensive.
      */
     static PluginLibrary* LoadModule(const char* aFilePath);
@@ -126,81 +126,77 @@ public:
      * Enumerate hook.
      */
     PluginIdentifierParent*
     GetIdentifierForNPIdentifier(NPP npp, NPIdentifier aIdentifier);
 
     void ProcessRemoteNativeEventsInRPCCall();
 
 protected:
-    NS_OVERRIDE
     virtual mozilla::ipc::RPCChannel::RacyRPCPolicy
-    MediateRPCRace(const Message& parent, const Message& child)
+    MediateRPCRace(const Message& parent, const Message& child) MOZ_OVERRIDE
     {
         return MediateRace(parent, child);
     }
 
     virtual bool RecvXXX_HACK_FIXME_cjones(Shmem& mem) { NS_RUNTIMEABORT("not reached"); return false; }
 
-    NS_OVERRIDE
-    virtual bool ShouldContinueFromReplyTimeout();
+    virtual bool ShouldContinueFromReplyTimeout() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool
-    RecvBackUpXResources(const FileDescriptor& aXSocketFd);
+    RecvBackUpXResources(const FileDescriptor& aXSocketFd) MOZ_OVERRIDE;
 
     virtual bool
     AnswerNPN_UserAgent(nsCString* userAgent);
 
     virtual bool
     AnswerNPN_GetValue_WithBoolReturn(const NPNVariable& aVariable,
                                       NPError* aError,
                                       bool* aBoolVal);
 
-    NS_OVERRIDE
-    virtual bool AnswerProcessSomeEvents();
+    virtual bool AnswerProcessSomeEvents() MOZ_OVERRIDE;
 
-    NS_OVERRIDE virtual bool
-    RecvProcessNativeEventsInRPCCall();
+    virtual bool
+    RecvProcessNativeEventsInRPCCall() MOZ_OVERRIDE;
 
-    NS_OVERRIDE virtual bool
+    virtual bool
     RecvPluginShowWindow(const uint32_t& aWindowId, const bool& aModal,
                          const int32_t& aX, const int32_t& aY,
-                         const size_t& aWidth, const size_t& aHeight);
+                         const size_t& aWidth, const size_t& aHeight) MOZ_OVERRIDE;
 
-    NS_OVERRIDE virtual bool
-    RecvPluginHideWindow(const uint32_t& aWindowId);
+    virtual bool
+    RecvPluginHideWindow(const uint32_t& aWindowId) MOZ_OVERRIDE;
 
-    NS_OVERRIDE virtual PCrashReporterParent*
+    virtual PCrashReporterParent*
     AllocPCrashReporter(mozilla::dom::NativeThreadId* id,
-                        PRUint32* processType);
-    NS_OVERRIDE virtual bool
-    DeallocPCrashReporter(PCrashReporterParent* actor);
+                        PRUint32* processType) MOZ_OVERRIDE;
+    virtual bool
+    DeallocPCrashReporter(PCrashReporterParent* actor) MOZ_OVERRIDE;
 
-    NS_OVERRIDE virtual bool
-    RecvSetCursor(const NSCursorInfo& aCursorInfo);
+    virtual bool
+    RecvSetCursor(const NSCursorInfo& aCursorInfo) MOZ_OVERRIDE;
 
-    NS_OVERRIDE virtual bool
-    RecvShowCursor(const bool& aShow);
+    virtual bool
+    RecvShowCursor(const bool& aShow) MOZ_OVERRIDE;
 
-    NS_OVERRIDE virtual bool
-    RecvPushCursor(const NSCursorInfo& aCursorInfo);
+    virtual bool
+    RecvPushCursor(const NSCursorInfo& aCursorInfo) MOZ_OVERRIDE;
 
-    NS_OVERRIDE virtual bool
-    RecvPopCursor();
+    virtual bool
+    RecvPopCursor() MOZ_OVERRIDE;
 
-    NS_OVERRIDE virtual bool
-    RecvGetNativeCursorsSupported(bool* supported);
+    virtual bool
+    RecvGetNativeCursorsSupported(bool* supported) MOZ_OVERRIDE;
 
-    NS_OVERRIDE virtual bool
+    virtual bool
     RecvNPN_SetException(PPluginScriptableObjectParent* aActor,
-                         const nsCString& aMessage);
+                         const nsCString& aMessage) MOZ_OVERRIDE;
 
-    NS_OVERRIDE virtual bool
-    RecvNPN_ReloadPlugins(const bool& aReloadPages);
+    virtual bool
+    RecvNPN_ReloadPlugins(const bool& aReloadPages) MOZ_OVERRIDE;
 
     static PluginInstanceParent* InstCast(NPP instance);
     static BrowserStreamParent* StreamCast(NPP instance, NPStream* s);
 
 private:
     void SetPluginFuncs(NPPluginFuncs* aFuncs);
 
     // Implement the module-level functions from NPAPI; these are
@@ -239,27 +235,24 @@ private:
                                 void *value);
     static void NPP_URLRedirectNotify(NPP instance, const char* url,
                                       int32_t status, void* notifyData);
 
     virtual bool HasRequiredFunctions();
     virtual nsresult AsyncSetWindow(NPP instance, NPWindow* window);
     virtual nsresult GetImageContainer(NPP instance, mozilla::layers::ImageContainer** aContainer);
     virtual nsresult GetImageSize(NPP instance, nsIntSize* aSize);
-    NS_OVERRIDE virtual bool UseAsyncPainting() { return true; }
-    NS_OVERRIDE
-    virtual nsresult SetBackgroundUnknown(NPP instance);
-    NS_OVERRIDE
+    virtual bool UseAsyncPainting() MOZ_OVERRIDE { return true; }
+    virtual nsresult SetBackgroundUnknown(NPP instance) MOZ_OVERRIDE;
     virtual nsresult BeginUpdateBackground(NPP instance,
                                            const nsIntRect& aRect,
-                                           gfxContext** aCtx);
-    NS_OVERRIDE
+                                           gfxContext** aCtx) MOZ_OVERRIDE;
     virtual nsresult EndUpdateBackground(NPP instance,
                                          gfxContext* aCtx,
-                                         const nsIntRect& aRect);
+                                         const nsIntRect& aRect) MOZ_OVERRIDE;
 
 #if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
     virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs, NPError* error);
 #else
     virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error);
 #endif
     virtual nsresult NP_Shutdown(NPError* error);
     virtual nsresult NP_GetMIMEDescription(const char** mimeDesc);
@@ -315,17 +308,17 @@ private:
     ScopedClose mPluginXSocketFdDup;
 #endif
 
     friend class mozilla::dom::CrashReporterParent;
 
 #ifdef MOZ_CRASHREPORTER_INJECTOR
     void InitializeInjector();
     
-    NS_OVERRIDE void OnCrash(DWORD processID);
+    void OnCrash(DWORD processID) MOZ_OVERRIDE;
 
     DWORD mFlashProcess1;
     DWORD mFlashProcess2;
 #endif
 };
 
 } // namespace plugins
 } // namespace mozilla
--- a/dom/plugins/ipc/PluginProcessChild.h
+++ b/dom/plugins/ipc/PluginProcessChild.h
@@ -20,18 +20,18 @@ protected:
 
 public:
     PluginProcessChild(ProcessHandle parentHandle) : ProcessChild(parentHandle)
     { }
 
     virtual ~PluginProcessChild()
     { }
 
-    NS_OVERRIDE virtual bool Init();
-    NS_OVERRIDE virtual void CleanUp();
+    virtual bool Init() MOZ_OVERRIDE;
+    virtual void CleanUp() MOZ_OVERRIDE;
 
 protected:
     static PluginProcessChild* current() {
         return static_cast<PluginProcessChild*>(ProcessChild::current());
     }
 
 private:
     PluginModuleChild mPlugin;
--- a/dom/plugins/ipc/PluginStreamChild.h
+++ b/dom/plugins/ipc/PluginStreamChild.h
@@ -17,17 +17,17 @@ class PluginInstanceChild;
 class PluginStreamChild : public PPluginStreamChild, public AStream
 {
   friend class PluginInstanceChild;
 
 public:
   PluginStreamChild();
   virtual ~PluginStreamChild() { }
 
-  NS_OVERRIDE virtual bool IsBrowserStream() { return false; }
+  virtual bool IsBrowserStream() MOZ_OVERRIDE { return false; }
 
   virtual bool Answer__delete__(const NPReason& reason,
                                 const bool& artificial);
 
   int32_t NPN_Write(int32_t length, void* buffer);
   void NPP_DestroyStream(NPError reason);
 
   void EnsureCorrectInstance(PluginInstanceChild* i)
--- a/dom/plugins/ipc/PluginStreamParent.h
+++ b/dom/plugins/ipc/PluginStreamParent.h
@@ -19,17 +19,17 @@ class PluginStreamParent : public PPlugi
   friend class PluginModuleParent;
   friend class PluginInstanceParent;
 
 public:
   PluginStreamParent(PluginInstanceParent* npp, const nsCString& mimeType,
                      const nsCString& target, NPError* result);
   virtual ~PluginStreamParent() { }
 
-  NS_OVERRIDE virtual bool IsBrowserStream() { return false; }
+  virtual bool IsBrowserStream() MOZ_OVERRIDE { return false; }
 
   virtual bool AnswerNPN_Write(const Buffer& data, int32_t* written);
 
   virtual bool Answer__delete__(const NPError& reason, const bool& artificial);
 
 private:
   void NPN_DestroyStream(NPReason reason);
 
--- a/dom/plugins/ipc/StreamNotifyChild.h
+++ b/dom/plugins/ipc/StreamNotifyChild.h
@@ -21,26 +21,26 @@ class StreamNotifyChild : public PStream
 
 public:
   StreamNotifyChild(const nsCString& aURL)
     : mURL(aURL)
     , mClosure(NULL)
     , mBrowserStream(NULL)
   { }
 
-  NS_OVERRIDE virtual void ActorDestroy(ActorDestroyReason why);
+  virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
   void SetValid(void* aClosure) {
     mClosure = aClosure;
   }
 
   void NPP_URLNotify(NPReason reason);
 
 private:
-  NS_OVERRIDE virtual bool Recv__delete__(const NPReason& reason);
+  virtual bool Recv__delete__(const NPReason& reason) MOZ_OVERRIDE;
 
   bool RecvRedirectNotify(const nsCString& url, const int32_t& status);
 
   /**
    * If a stream is created for this this URLNotify, we associate the objects
    * so that the NPP_URLNotify call is not fired before the stream data is
    * completely delivered. The BrowserStreamChild takes responsibility for
    * calling NPP_URLNotify and deleting this object.
--- a/dom/sms/src/ipc/SmsChild.h
+++ b/dom/sms/src/ipc/SmsChild.h
@@ -10,30 +10,30 @@
 
 namespace mozilla {
 namespace dom {
 namespace sms {
 
 class SmsChild : public PSmsChild
 {
 public:
-  NS_OVERRIDE virtual bool RecvNotifyReceivedMessage(const SmsMessageData& aMessage);
-  NS_OVERRIDE virtual bool RecvNotifySentMessage(const SmsMessageData& aMessage);
-  NS_OVERRIDE virtual bool RecvNotifyDeliveredMessage(const SmsMessageData& aMessage);
-  NS_OVERRIDE virtual bool RecvNotifyRequestSmsSent(const SmsMessageData& aMessage, const PRInt32& aRequestId, const PRUint64& aProcessId);
-  NS_OVERRIDE virtual bool RecvNotifyRequestSmsSendFailed(const PRInt32& aError, const PRInt32& aRequestId, const PRUint64& aProcessId);
-  NS_OVERRIDE virtual bool RecvNotifyRequestGotSms(const SmsMessageData& aMessage, const PRInt32& aRequestId, const PRUint64& aProcessId);
-  NS_OVERRIDE virtual bool RecvNotifyRequestGetSmsFailed(const PRInt32& aError, const PRInt32& aRequestId, const PRUint64& aProcessId);
-  NS_OVERRIDE virtual bool RecvNotifyRequestSmsDeleted(const bool& aDeleted, const PRInt32& aRequestId, const PRUint64& aProcessId);
-  NS_OVERRIDE virtual bool RecvNotifyRequestSmsDeleteFailed(const PRInt32& aError, const PRInt32& aRequestId, const PRUint64& aProcessId);
-  NS_OVERRIDE virtual bool RecvNotifyRequestNoMessageInList(const PRInt32& aRequestId, const PRUint64& aProcessId);
-  NS_OVERRIDE virtual bool RecvNotifyRequestCreateMessageList(const PRInt32& aListId, const SmsMessageData& aMessage, const PRInt32& aRequestId, const PRUint64& aProcessId);
-  NS_OVERRIDE virtual bool RecvNotifyRequestGotNextMessage(const SmsMessageData& aMessage, const PRInt32& aRequestId, const PRUint64& aProcessId);
-  NS_OVERRIDE virtual bool RecvNotifyRequestReadListFailed(const PRInt32& aError, const PRInt32& aRequestId, const PRUint64& aProcessId);
-  NS_OVERRIDE virtual bool RecvNotifyRequestMarkedMessageRead(const bool& aRead, const PRInt32& aRequestId, const PRUint64& aProcessId);
-  NS_OVERRIDE virtual bool RecvNotifyRequestMarkMessageReadFailed(const PRInt32& aError, const PRInt32& aRequestId, const PRUint64& aProcessId);
+  virtual bool RecvNotifyReceivedMessage(const SmsMessageData& aMessage) MOZ_OVERRIDE;
+  virtual bool RecvNotifySentMessage(const SmsMessageData& aMessage) MOZ_OVERRIDE;
+  virtual bool RecvNotifyDeliveredMessage(const SmsMessageData& aMessage) MOZ_OVERRIDE;
+  virtual bool RecvNotifyRequestSmsSent(const SmsMessageData& aMessage, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
+  virtual bool RecvNotifyRequestSmsSendFailed(const PRInt32& aError, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
+  virtual bool RecvNotifyRequestGotSms(const SmsMessageData& aMessage, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
+  virtual bool RecvNotifyRequestGetSmsFailed(const PRInt32& aError, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
+  virtual bool RecvNotifyRequestSmsDeleted(const bool& aDeleted, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
+  virtual bool RecvNotifyRequestSmsDeleteFailed(const PRInt32& aError, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
+  virtual bool RecvNotifyRequestNoMessageInList(const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
+  virtual bool RecvNotifyRequestCreateMessageList(const PRInt32& aListId, const SmsMessageData& aMessage, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
+  virtual bool RecvNotifyRequestGotNextMessage(const SmsMessageData& aMessage, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
+  virtual bool RecvNotifyRequestReadListFailed(const PRInt32& aError, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
+  virtual bool RecvNotifyRequestMarkedMessageRead(const bool& aRead, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
+  virtual bool RecvNotifyRequestMarkMessageReadFailed(const PRInt32& aError, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
 };
 
 } // namespace sms
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_sms_SmsChild_h
--- a/dom/sms/src/ipc/SmsParent.h
+++ b/dom/sms/src/ipc/SmsParent.h
@@ -19,27 +19,27 @@ class SmsParent : public PSmsParent
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
 
   static void GetAll(nsTArray<SmsParent*>& aArray);
 
   SmsParent();
 
-  NS_OVERRIDE virtual bool RecvHasSupport(bool* aHasSupport);
-  NS_OVERRIDE virtual bool RecvGetNumberOfMessagesForText(const nsString& aText, PRUint16* aResult);
-  NS_OVERRIDE virtual bool RecvSendMessage(const nsString& aNumber, const nsString& aMessage, const PRInt32& aRequestId, const PRUint64& aProcessId);
-  NS_OVERRIDE virtual bool RecvSaveReceivedMessage(const nsString& aSender, const nsString& aBody, const PRUint64& aDate, PRInt32* aId);
-  NS_OVERRIDE virtual bool RecvSaveSentMessage(const nsString& aRecipient, const nsString& aBody, const PRUint64& aDate, PRInt32* aId);
-  NS_OVERRIDE virtual bool RecvGetMessage(const PRInt32& aMessageId, const PRInt32& aRequestId, const PRUint64& aProcessId);
-  NS_OVERRIDE virtual bool RecvDeleteMessage(const PRInt32& aMessageId, const PRInt32& aRequestId, const PRUint64& aProcessId);
-  NS_OVERRIDE virtual bool RecvCreateMessageList(const SmsFilterData& aFilter, const bool& aReverse, const PRInt32& aRequestId, const PRUint64& aProcessId);
-  NS_OVERRIDE virtual bool RecvGetNextMessageInList(const PRInt32& aListId, const PRInt32& aRequestId, const PRUint64& aProcessId);
-  NS_OVERRIDE virtual bool RecvClearMessageList(const PRInt32& aListId);
-  NS_OVERRIDE virtual bool RecvMarkMessageRead(const PRInt32& aMessageId, const bool& aValue, const PRInt32& aRequestId, const PRUint64& aProcessId);
+  virtual bool RecvHasSupport(bool* aHasSupport) MOZ_OVERRIDE;
+  virtual bool RecvGetNumberOfMessagesForText(const nsString& aText, PRUint16* aResult) MOZ_OVERRIDE;
+  virtual bool RecvSendMessage(const nsString& aNumber, const nsString& aMessage, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
+  virtual bool RecvSaveReceivedMessage(const nsString& aSender, const nsString& aBody, const PRUint64& aDate, PRInt32* aId) MOZ_OVERRIDE;
+  virtual bool RecvSaveSentMessage(const nsString& aRecipient, const nsString& aBody, const PRUint64& aDate, PRInt32* aId) MOZ_OVERRIDE;
+  virtual bool RecvGetMessage(const PRInt32& aMessageId, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
+  virtual bool RecvDeleteMessage(const PRInt32& aMessageId, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
+  virtual bool RecvCreateMessageList(const SmsFilterData& aFilter, const bool& aReverse, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
+  virtual bool RecvGetNextMessageInList(const PRInt32& aListId, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
+  virtual bool RecvClearMessageList(const PRInt32& aListId) MOZ_OVERRIDE;
+  virtual bool RecvMarkMessageRead(const PRInt32& aMessageId, const bool& aValue, const PRInt32& aRequestId, const PRUint64& aProcessId) MOZ_OVERRIDE;
 
 protected:
   virtual void ActorDestroy(ActorDestroyReason why);
 
 private:
   static nsTArray<SmsParent*>* gSmsParents;
 };
 
--- a/gfx/layers/ipc/ShadowLayerChild.h
+++ b/gfx/layers/ipc/ShadowLayerChild.h
@@ -19,18 +19,17 @@ class ShadowLayerChild : public PLayerCh
 {
 public:
   ShadowLayerChild(ShadowableLayer* aLayer);
   virtual ~ShadowLayerChild();
 
   ShadowableLayer* layer() const { return mLayer; }
 
 protected:
-  NS_OVERRIDE
-  virtual void ActorDestroy(ActorDestroyReason why);
+  virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
 private:
   ShadowableLayer* mLayer;
 };
 
 } // namespace layers
 } // namespace mozilla
 
--- a/gfx/layers/ipc/ShadowLayerParent.h
+++ b/gfx/layers/ipc/ShadowLayerParent.h
@@ -27,18 +27,17 @@ public:
 
   void Bind(Layer* layer);
   void Destroy();
 
   Layer* AsLayer() const { return mLayer; }
   ContainerLayer* AsContainer() const;
 
 private:
-  NS_OVERRIDE
-  virtual void ActorDestroy(ActorDestroyReason why);
+  virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
   nsRefPtr<Layer> mLayer;
 };
 
 } // namespace layers
 } // namespace mozilla
 
 #endif // ifndef mozilla_layers_ShadowLayerParent_h
--- a/gfx/thebes/gfxImageSurface.h
+++ b/gfx/thebes/gfxImageSurface.h
@@ -84,19 +84,18 @@ public:
     /* return new Subimage with pointing to original image starting from aRect.pos
      * and size of aRect.size. New subimage keeping current image reference
      */
     already_AddRefed<gfxSubimageSurface> GetSubimage(const gfxRect& aRect);
 
     virtual already_AddRefed<gfxImageSurface> GetAsImageSurface();
 
     /** See gfxASurface.h. */
-    NS_OVERRIDE
     virtual void MovePixels(const nsIntRect& aSourceRect,
-                            const nsIntPoint& aDestTopLeft);
+                            const nsIntPoint& aDestTopLeft) MOZ_OVERRIDE;
 
 protected:
     gfxImageSurface();
     void InitWithData(unsigned char *aData, const gfxIntSize& aSize,
                       long aStride, gfxImageFormat aFormat);
     void InitFromSurface(cairo_surface_t *csurf);
     long ComputeStride() const { return ComputeStride(mSize, mFormat); }
 
--- a/hal/sandbox/SandboxHal.cpp
+++ b/hal/sandbox/SandboxHal.cpp
@@ -284,20 +284,20 @@ class HalParent : public PHalParent
                 , public BatteryObserver
                 , public NetworkObserver
                 , public ISensorObserver
                 , public WakeLockObserver
                 , public ScreenConfigurationObserver
                 , public SwitchObserver
 {
 public:
-  NS_OVERRIDE virtual bool
+  virtual bool
   RecvVibrate(const InfallibleTArray<unsigned int>& pattern,
               const InfallibleTArray<uint64_t> &id,
-              PBrowserParent *browserParent)
+              PBrowserParent *browserParent) MOZ_OVERRIDE
   {
     // Check whether browserParent is active.  We should have already
     // checked that the corresponding window is active, but this check
     // isn't redundant.  A window may be inactive in an active
     // browser.  And a window is not notified synchronously when it's
     // deactivated, so the window may think it's active when the tab
     // is actually inactive.
     TabParent *tabParent = static_cast<TabParent*>(browserParent);
@@ -311,301 +311,301 @@ public:
     // will do the right thing.
     nsCOMPtr<nsIDOMWindow> window =
       do_QueryInterface(tabParent->GetBrowserDOMWindow());
     WindowIdentifier newID(id, window);
     hal::Vibrate(pattern, newID);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
+  virtual bool
   RecvCancelVibrate(const InfallibleTArray<uint64_t> &id,
-                    PBrowserParent *browserParent)
+                    PBrowserParent *browserParent) MOZ_OVERRIDE
   {
     TabParent *tabParent = static_cast<TabParent*>(browserParent);
     nsCOMPtr<nsIDOMWindow> window =
       do_QueryInterface(tabParent->GetBrowserDOMWindow());
     WindowIdentifier newID(id, window);
     hal::CancelVibrate(newID);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvEnableBatteryNotifications() {
+  virtual bool
+  RecvEnableBatteryNotifications() MOZ_OVERRIDE {
     hal::RegisterBatteryObserver(this);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvDisableBatteryNotifications() {
+  virtual bool
+  RecvDisableBatteryNotifications() MOZ_OVERRIDE {
     hal::UnregisterBatteryObserver(this);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvGetCurrentBatteryInformation(BatteryInformation* aBatteryInfo) {
+  virtual bool
+  RecvGetCurrentBatteryInformation(BatteryInformation* aBatteryInfo) MOZ_OVERRIDE {
     hal::GetCurrentBatteryInformation(aBatteryInfo);
     return true;
   }
 
-  void Notify(const BatteryInformation& aBatteryInfo) {
+  void Notify(const BatteryInformation& aBatteryInfo) MOZ_OVERRIDE {
     unused << SendNotifyBatteryChange(aBatteryInfo);
   }
 
-  NS_OVERRIDE virtual bool
-  RecvEnableNetworkNotifications() {
+  virtual bool
+  RecvEnableNetworkNotifications() MOZ_OVERRIDE {
     hal::RegisterNetworkObserver(this);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvDisableNetworkNotifications() {
+  virtual bool
+  RecvDisableNetworkNotifications() MOZ_OVERRIDE {
     hal::UnregisterNetworkObserver(this);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvGetCurrentNetworkInformation(NetworkInformation* aNetworkInfo) {
+  virtual bool
+  RecvGetCurrentNetworkInformation(NetworkInformation* aNetworkInfo) MOZ_OVERRIDE {
     hal::GetCurrentNetworkInformation(aNetworkInfo);
     return true;
   }
 
   void Notify(const NetworkInformation& aNetworkInfo) {
     unused << SendNotifyNetworkChange(aNetworkInfo);
   }
 
-  NS_OVERRIDE virtual bool
-  RecvEnableScreenConfigurationNotifications() {
+  virtual bool
+  RecvEnableScreenConfigurationNotifications() MOZ_OVERRIDE {
     hal::RegisterScreenConfigurationObserver(this);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvDisableScreenConfigurationNotifications() {
+  virtual bool
+  RecvDisableScreenConfigurationNotifications() MOZ_OVERRIDE {
     hal::UnregisterScreenConfigurationObserver(this);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvGetCurrentScreenConfiguration(ScreenConfiguration* aScreenConfiguration) {
+  virtual bool
+  RecvGetCurrentScreenConfiguration(ScreenConfiguration* aScreenConfiguration) MOZ_OVERRIDE {
     hal::GetCurrentScreenConfiguration(aScreenConfiguration);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvLockScreenOrientation(const dom::ScreenOrientation& aOrientation, bool* aAllowed)
+  virtual bool
+  RecvLockScreenOrientation(const dom::ScreenOrientation& aOrientation, bool* aAllowed) MOZ_OVERRIDE
   {
     *aAllowed = hal::LockScreenOrientation(aOrientation);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvUnlockScreenOrientation()
+  virtual bool
+  RecvUnlockScreenOrientation() MOZ_OVERRIDE
   {
     hal::UnlockScreenOrientation();
     return true;
   }
 
   void Notify(const ScreenConfiguration& aScreenConfiguration) {
     unused << SendNotifyScreenConfigurationChange(aScreenConfiguration);
   }
 
-  NS_OVERRIDE virtual bool
-  RecvGetScreenEnabled(bool *enabled)
+  virtual bool
+  RecvGetScreenEnabled(bool *enabled) MOZ_OVERRIDE
   {
     *enabled = hal::GetScreenEnabled();
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvSetScreenEnabled(const bool &enabled)
+  virtual bool
+  RecvSetScreenEnabled(const bool &enabled) MOZ_OVERRIDE
   {
     hal::SetScreenEnabled(enabled);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvGetCpuSleepAllowed(bool *allowed)
+  virtual bool
+  RecvGetCpuSleepAllowed(bool *allowed) MOZ_OVERRIDE
   {
     *allowed = hal::GetCpuSleepAllowed();
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvSetCpuSleepAllowed(const bool &allowed)
+  virtual bool
+  RecvSetCpuSleepAllowed(const bool &allowed) MOZ_OVERRIDE
   {
     hal::SetCpuSleepAllowed(allowed);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvGetScreenBrightness(double *brightness)
+  virtual bool
+  RecvGetScreenBrightness(double *brightness) MOZ_OVERRIDE
   {
     *brightness = hal::GetScreenBrightness();
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvSetScreenBrightness(const double &brightness)
+  virtual bool
+  RecvSetScreenBrightness(const double &brightness) MOZ_OVERRIDE
   {
     hal::SetScreenBrightness(brightness);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvSetLight(const LightType& aLight,  const hal::LightConfiguration& aConfig, bool *status)
+  virtual bool
+  RecvSetLight(const LightType& aLight,  const hal::LightConfiguration& aConfig, bool *status) MOZ_OVERRIDE
   {
     *status = hal::SetLight(aLight, aConfig);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvGetLight(const LightType& aLight, LightConfiguration* aConfig, bool* status)
+  virtual bool
+  RecvGetLight(const LightType& aLight, LightConfiguration* aConfig, bool* status) MOZ_OVERRIDE
   {
     *status = hal::GetLight(aLight, aConfig);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvAdjustSystemClock(const int32_t &aDeltaMilliseconds)
+  virtual bool
+  RecvAdjustSystemClock(const int32_t &aDeltaMilliseconds) MOZ_OVERRIDE
   {
     hal::AdjustSystemClock(aDeltaMilliseconds);
     return true;
   }
 
-  NS_OVERRIDE virtual bool 
-  RecvSetTimezone(const nsCString& aTimezoneSpec)
+  virtual bool 
+  RecvSetTimezone(const nsCString& aTimezoneSpec) MOZ_OVERRIDE
   {
     hal::SetTimezone(aTimezoneSpec);
     return true;  
   }
 
-  NS_OVERRIDE virtual bool
-  RecvReboot()
+  virtual bool
+  RecvReboot() MOZ_OVERRIDE
   {
     hal::Reboot();
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvPowerOff()
+  virtual bool
+  RecvPowerOff() MOZ_OVERRIDE
   {
     hal::PowerOff();
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvEnableSensorNotifications(const SensorType &aSensor) {
+  virtual bool
+  RecvEnableSensorNotifications(const SensorType &aSensor) MOZ_OVERRIDE {
     hal::RegisterSensorObserver(aSensor, this);
     return true;
   }
    
-  NS_OVERRIDE virtual bool
-  RecvDisableSensorNotifications(const SensorType &aSensor) {
+  virtual bool
+  RecvDisableSensorNotifications(const SensorType &aSensor) MOZ_OVERRIDE {
     hal::UnregisterSensorObserver(aSensor, this);
     return true;
   }
   
   void Notify(const SensorData& aSensorData) {
     unused << SendNotifySensorChange(aSensorData);
   }
 
-  NS_OVERRIDE virtual bool
+  virtual bool
   RecvModifyWakeLock(const nsString &aTopic,
                      const WakeLockControl &aLockAdjust,
-                     const WakeLockControl &aHiddenAdjust)
+                     const WakeLockControl &aHiddenAdjust) MOZ_OVERRIDE
   {
     hal::ModifyWakeLock(aTopic, aLockAdjust, aHiddenAdjust);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvEnableWakeLockNotifications()
+  virtual bool
+  RecvEnableWakeLockNotifications() MOZ_OVERRIDE
   {
     hal::RegisterWakeLockObserver(this);
     return true;
   }
    
-  NS_OVERRIDE virtual bool
-  RecvDisableWakeLockNotifications()
+  virtual bool
+  RecvDisableWakeLockNotifications() MOZ_OVERRIDE
   {
     hal::UnregisterWakeLockObserver(this);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvGetWakeLockInfo(const nsString &aTopic, WakeLockInformation *aWakeLockInfo)
+  virtual bool
+  RecvGetWakeLockInfo(const nsString &aTopic, WakeLockInformation *aWakeLockInfo) MOZ_OVERRIDE
   {
     hal::GetWakeLockInfo(aTopic, aWakeLockInfo);
     return true;
   }
   
   void Notify(const WakeLockInformation& aWakeLockInfo)
   {
     unused << SendNotifyWakeLockChange(aWakeLockInfo);
   }
 
-  NS_OVERRIDE virtual bool
-  RecvEnableSwitchNotifications(const SwitchDevice& aDevice) 
+  virtual bool
+  RecvEnableSwitchNotifications(const SwitchDevice& aDevice) MOZ_OVERRIDE
   {
     hal::RegisterSwitchObserver(aDevice, this);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvDisableSwitchNotifications(const SwitchDevice& aDevice) 
+  virtual bool
+  RecvDisableSwitchNotifications(const SwitchDevice& aDevice) MOZ_OVERRIDE
   {
     hal::UnregisterSwitchObserver(aDevice, this);
     return true;
   }
 
   void Notify(const SwitchEvent& aSwitchEvent)
   {
     unused << SendNotifySwitchChange(aSwitchEvent);
   }
 
-  NS_OVERRIDE virtual bool
-  RecvGetCurrentSwitchState(const SwitchDevice& aDevice, hal::SwitchState *aState)
+  virtual bool
+  RecvGetCurrentSwitchState(const SwitchDevice& aDevice, hal::SwitchState *aState) MOZ_OVERRIDE
   {
     *aState = hal::GetCurrentSwitchState(aDevice);
     return true;
   }
 };
 
 class HalChild : public PHalChild {
 public:
-  NS_OVERRIDE virtual bool
-  RecvNotifyBatteryChange(const BatteryInformation& aBatteryInfo) {
+  virtual bool
+  RecvNotifyBatteryChange(const BatteryInformation& aBatteryInfo) MOZ_OVERRIDE {
     hal::NotifyBatteryChange(aBatteryInfo);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvNotifySensorChange(const hal::SensorData &aSensorData);
+  virtual bool
+  RecvNotifySensorChange(const hal::SensorData &aSensorData) MOZ_OVERRIDE;
 
-  NS_OVERRIDE virtual bool
-  RecvNotifyNetworkChange(const NetworkInformation& aNetworkInfo) {
+  virtual bool
+  RecvNotifyNetworkChange(const NetworkInformation& aNetworkInfo) MOZ_OVERRIDE {
     hal::NotifyNetworkChange(aNetworkInfo);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvNotifyWakeLockChange(const WakeLockInformation& aWakeLockInfo) {
+  virtual bool
+  RecvNotifyWakeLockChange(const WakeLockInformation& aWakeLockInfo) MOZ_OVERRIDE {
     hal::NotifyWakeLockChange(aWakeLockInfo);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvNotifyScreenConfigurationChange(const ScreenConfiguration& aScreenConfiguration) {
+  virtual bool
+  RecvNotifyScreenConfigurationChange(const ScreenConfiguration& aScreenConfiguration) MOZ_OVERRIDE {
     hal::NotifyScreenConfigurationChange(aScreenConfiguration);
     return true;
   }
 
-  NS_OVERRIDE virtual bool
-  RecvNotifySwitchChange(const mozilla::hal::SwitchEvent& aEvent) {
+  virtual bool
+  RecvNotifySwitchChange(const mozilla::hal::SwitchEvent& aEvent) MOZ_OVERRIDE {
     hal::NotifySwitchChange(aEvent);
     return true;
   }
 };
 
 bool
 HalChild::RecvNotifySensorChange(const hal::SensorData &aSensorData) {
   hal::NotifySensorChange(aSensorData);
--- a/ipc/glue/AsyncChannel.h
+++ b/ipc/glue/AsyncChannel.h
@@ -163,36 +163,36 @@ public:
         ProcessLink(AsyncChannel *chan);
         virtual ~ProcessLink();
         void Open(Transport* aTransport, MessageLoop *aIOLoop, Side aSide);
         
         // Run on the I/O thread, only when using inter-process link.
         // These methods acquire the monitor and forward to the
         // similarly named methods in AsyncChannel below
         // (OnMessageReceivedFromLink(), etc)
-        NS_OVERRIDE virtual void OnMessageReceived(const Message& msg);
-        NS_OVERRIDE virtual void OnChannelConnected(int32 peer_pid);
-        NS_OVERRIDE virtual void OnChannelError();
+        virtual void OnMessageReceived(const Message& msg) MOZ_OVERRIDE;
+        virtual void OnChannelConnected(int32 peer_pid) MOZ_OVERRIDE;
+        virtual void OnChannelError() MOZ_OVERRIDE;
 
-        NS_OVERRIDE virtual void EchoMessage(Message *msg);
-        NS_OVERRIDE virtual void SendMessage(Message *msg);
-        NS_OVERRIDE virtual void SendClose();
+        virtual void EchoMessage(Message *msg) MOZ_OVERRIDE;
+        virtual void SendMessage(Message *msg) MOZ_OVERRIDE;
+        virtual void SendClose() MOZ_OVERRIDE;
     };
     
     class ThreadLink : public Link {
     protected:
         AsyncChannel* mTargetChan;
     
     public:
         ThreadLink(AsyncChannel *aChan, AsyncChannel *aTargetChan);
         virtual ~ThreadLink();
 
-        NS_OVERRIDE virtual void EchoMessage(Message *msg);
-        NS_OVERRIDE virtual void SendMessage(Message *msg);
-        NS_OVERRIDE virtual void SendClose();
+        virtual void EchoMessage(Message *msg) MOZ_OVERRIDE;
+        virtual void SendMessage(Message *msg) MOZ_OVERRIDE;
+        virtual void SendClose() MOZ_OVERRIDE;
     };
 
 protected:
     // The "link" thread is either the I/O thread (ProcessLink) or the
     // other actor's work thread (ThreadLink).  In either case, it is
     // NOT our worker thread.
     void AssertLinkThread() const
     {
--- a/ipc/glue/RPCChannel.h
+++ b/ipc/glue/RPCChannel.h
@@ -81,28 +81,25 @@ public:
         }
         virtual void ProcessRemoteNativeEventsInRPCCall() {};
     };
 
     RPCChannel(RPCListener* aListener);
 
     virtual ~RPCChannel();
 
-    NS_OVERRIDE
-    void Clear();
+    void Clear() MOZ_OVERRIDE;
 
     // Make an RPC to the other side of the channel
     bool Call(Message* msg, Message* reply);
 
     // RPCChannel overrides these so that the async and sync messages
     // can be counted against mStackFrames
-    NS_OVERRIDE
-    virtual bool Send(Message* msg);
-    NS_OVERRIDE
-    virtual bool Send(Message* msg, Message* reply);
+    virtual bool Send(Message* msg) MOZ_OVERRIDE;
+    virtual bool Send(Message* msg, Message* reply) MOZ_OVERRIDE;
 
     // Asynchronously, send the child a message that puts it in such a
     // state that it can't send messages to the parent unless the
     // parent sends a message to it first.  The child stays in this
     // state until the parent calls |UnblockChild()|.
     //
     // It is an error to
     //  - call this on the child side of the channel.
@@ -122,18 +119,17 @@ public:
     // Return true iff successful.
     bool UnblockChild();
 
     // Return true iff this has code on the C++ stack.
     bool IsOnCxxStack() const {
         return !mCxxStackFrames.empty();
     }
 
-    NS_OVERRIDE
-    virtual bool OnSpecialMessage(uint16 id, const Message& msg);
+    virtual bool OnSpecialMessage(uint16 id, const Message& msg) MOZ_OVERRIDE;
 
 
     /**
      * If there is a pending RPC message, process all pending messages.
      *
      * @note This method is used on Windows when we detect that an outbound
      * OLE RPC call is being made to unblock the parent.
      */
@@ -144,28 +140,27 @@ public:
     static void NotifyGeckoEventDispatch();
 
 protected:
     bool WaitForNotify();
     void SpinInternalEventLoop();
 #endif
 
 protected:
-    NS_OVERRIDE virtual void OnMessageReceivedFromLink(const Message& msg);
-    NS_OVERRIDE virtual void OnChannelErrorFromLink();
+    virtual void OnMessageReceivedFromLink(const Message& msg) MOZ_OVERRIDE;
+    virtual void OnChannelErrorFromLink() MOZ_OVERRIDE;
 
 private:
     // Called on worker thread only
 
     RPCListener* Listener() const {
         return static_cast<RPCListener*>(mListener);
     }
 
-    NS_OVERRIDE
-    virtual bool ShouldDeferNotifyMaybeError() const {
+    virtual bool ShouldDeferNotifyMaybeError() const MOZ_OVERRIDE {
         return IsOnCxxStack();
     }
 
     bool EventOccurred() const;
 
     void MaybeUndeferIncall();
     void EnqueuePendingMessages();
 
--- a/ipc/glue/SharedMemory.h
+++ b/ipc/glue/SharedMemory.h
@@ -5,16 +5,17 @@
  * 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_ipc_SharedMemory_h
 #define mozilla_ipc_SharedMemory_h
 
 #include "nsDebug.h"
 #include "nsISupportsImpl.h"    // NS_INLINE_DECL_REFCOUNTING
+#include "mozilla/Attributes.h"
 
 //
 // This is a low-level wrapper around platform shared memory.  Don't
 // use it directly; use Shmem allocated through IPDL interfaces.
 //
 namespace {
 enum Rights {
   RightsNone = 0,
--- a/ipc/glue/SharedMemoryBasic_android.h
+++ b/ipc/glue/SharedMemoryBasic_android.h
@@ -26,30 +26,26 @@ public:
   typedef base::FileDescriptor Handle;
 
   SharedMemoryBasic();
 
   SharedMemoryBasic(const Handle& aHandle);
 
   virtual ~SharedMemoryBasic();
 
-  NS_OVERRIDE
-  virtual bool Create(size_t aNbytes);
+  virtual bool Create(size_t aNbytes) MOZ_OVERRIDE;
 
-  NS_OVERRIDE
-  virtual bool Map(size_t nBytes);
+  virtual bool Map(size_t nBytes) MOZ_OVERRIDE;
 
-  NS_OVERRIDE
-  virtual void* memory() const
+  virtual void* memory() const MOZ_OVERRIDE
   {
     return mMemory;
   }
 
-  NS_OVERRIDE
-  virtual SharedMemoryType Type() const
+  virtual SharedMemoryType Type() const MOZ_OVERRIDE
   {
     return TYPE_BASIC;
   }
 
   static Handle NULLHandle()
   {
     return Handle();
   }
--- a/ipc/glue/SharedMemoryBasic_chromium.h
+++ b/ipc/glue/SharedMemoryBasic_chromium.h
@@ -30,44 +30,40 @@ public:
   {
   }
 
   SharedMemoryBasic(const Handle& aHandle)
     : mSharedMemory(aHandle, false)
   {
   }
 
-  NS_OVERRIDE
-  virtual bool Create(size_t aNbytes)
+  virtual bool Create(size_t aNbytes) MOZ_OVERRIDE
   {
     bool ok = mSharedMemory.Create("", false, false, aNbytes);
     if (ok) {
       Created(aNbytes);
     }
     return ok;
   }
 
-  NS_OVERRIDE
-  virtual bool Map(size_t nBytes)
+  virtual bool Map(size_t nBytes) MOZ_OVERRIDE
   {
     bool ok = mSharedMemory.Map(nBytes);
     if (ok) {
       Mapped(nBytes);
     }
     return ok;
   }
 
-  NS_OVERRIDE
-  virtual void* memory() const
+  virtual void* memory() const MOZ_OVERRIDE
   {
     return mSharedMemory.memory();
   }
 
-  NS_OVERRIDE
-  virtual SharedMemoryType Type() const
+  virtual SharedMemoryType Type() const MOZ_OVERRIDE
   {
     return TYPE_BASIC;
   }
 
   static Handle NULLHandle()
   {
     return base::SharedMemory::NULLHandle();
   }
--- a/ipc/glue/SharedMemorySysV.h
+++ b/ipc/glue/SharedMemorySysV.h
@@ -54,32 +54,30 @@ public:
 
   virtual ~SharedMemorySysV()
   {
     shmdt(mData);
     mHandle = -1;
     mData = nsnull;
   }
 
-  NS_OVERRIDE
-  virtual bool Create(size_t aNbytes)
+  virtual bool Create(size_t aNbytes) MOZ_OVERRIDE
   {
     int id = shmget(IPC_PRIVATE, aNbytes, IPC_CREAT | 0600);
     if (id == -1)
       return false;
 
     mHandle = id;
     mAllocSize = aNbytes;
     Created(aNbytes);
 
     return Map(aNbytes);
   }
 
-  NS_OVERRIDE
-  virtual bool Map(size_t nBytes)
+  virtual bool Map(size_t nBytes) MOZ_OVERRIDE
   {
     // already mapped
     if (mData)
       return true;
 
     if (!IsHandleValid(mHandle))
       return false;
 
@@ -108,24 +106,22 @@ public:
     NS_ABORT_IF_FALSE(nBytes <= info.shm_segsz,
                       "Segment doesn't have enough space!");
 #endif
 
     Mapped(nBytes);
     return true;
   }
 
-  NS_OVERRIDE
-  virtual void* memory() const
+  virtual void* memory() const MOZ_OVERRIDE
   {
     return mData;
   }
 
-  NS_OVERRIDE
-  virtual SharedMemoryType Type() const
+  virtual SharedMemoryType Type() const MOZ_OVERRIDE
   {
     return TYPE_SYSV;
   }
 
   Handle GetHandle() const
   {
     NS_ABORT_IF_FALSE(IsHandleValid(mHandle), "invalid handle");
     return mHandle;
--- a/ipc/glue/SyncChannel.h
+++ b/ipc/glue/SyncChannel.h
@@ -36,18 +36,17 @@ public:
         virtual Result OnMessageReceived(const Message& aMessage,
                                          Message*& aReply) = 0;
         virtual void OnChannelConnected(int32 peer_pid) {};
     };
 
     SyncChannel(SyncListener* aListener);
     virtual ~SyncChannel();
 
-    NS_OVERRIDE
-    virtual bool Send(Message* msg) {
+    virtual bool Send(Message* msg) MOZ_OVERRIDE {
         return AsyncChannel::Send(msg);
     }
 
     // Synchronously send |msg| (i.e., wait for |reply|)
     virtual bool Send(Message* msg, Message* reply);
 
     // Set channel timeout value. Since this is broken up into
     // two period, the minimum timeout value is 2ms.
@@ -101,18 +100,18 @@ protected:
 
     /* the deepest sync stack frame on any channel */
     static SyncStackFrame* sStaticTopFrame;
 #endif // OS_WIN
 
 protected:
     // Executed on the link thread
     // Override the AsyncChannel handler so we can dispatch sync messages
-    NS_OVERRIDE virtual void OnMessageReceivedFromLink(const Message& msg);
-    NS_OVERRIDE virtual void OnChannelErrorFromLink();
+    virtual void OnMessageReceivedFromLink(const Message& msg) MOZ_OVERRIDE;
+    virtual void OnChannelErrorFromLink() MOZ_OVERRIDE;
 
     // Executed on the worker thread
     bool ProcessingSyncMessage() const {
         return mProcessingSyncMessage;
     }
 
     void OnDispatchMessage(const Message& aMsg);
 
--- a/ipc/ipdl/test/cxx/TestBadActor.h
+++ b/ipc/ipdl/test/cxx/TestBadActor.h
@@ -20,18 +20,17 @@ public:
   virtual ~TestBadActorParent() { }
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return false; }
 
   void Main();
 
 protected:
-  NS_OVERRIDE
-  virtual void ActorDestroy(ActorDestroyReason why)
+  virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
   {
     if (AbnormalShutdown != why)
       fail("unexpected destruction");
     passed("ok");
     QuitParent();
   }
 
   virtual PTestBadActorSubParent*
--- a/ipc/ipdl/test/cxx/TestBlockChild.h
+++ b/ipc/ipdl/test/cxx/TestBlockChild.h
@@ -21,30 +21,25 @@ public:
     virtual ~TestBlockChildParent() { }
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:
-    NS_OVERRIDE
-    virtual bool AnswerStackFrame();
+    virtual bool AnswerStackFrame() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvP1();
+    virtual bool RecvP1() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvP2();
+    virtual bool RecvP2() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvDone();
+    virtual bool RecvDone() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 
 private:
@@ -60,30 +55,25 @@ private:
 class TestBlockChildChild :
     public PTestBlockChildChild
 {
 public:
     TestBlockChildChild() { }
     virtual ~TestBlockChildChild() { }
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvPoke1();
+    virtual bool RecvPoke1() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool AnswerStackFrame();
+    virtual bool AnswerStackFrame() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvPoke2();
+    virtual bool RecvPoke2() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvLastPoke();
+    virtual bool RecvLastPoke() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 
 private:
     void OnPoke1();
--- a/ipc/ipdl/test/cxx/TestBridgeMain.h
+++ b/ipc/ipdl/test/cxx/TestBridgeMain.h
@@ -26,44 +26,38 @@ public:
     virtual ~TestBridgeMainParent() {}
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return false; }
 
     void Main();
 
 protected:
-    NS_OVERRIDE
     virtual PTestBridgeMainSubParent*
     AllocPTestBridgeMainSub(Transport* transport,
-                            ProcessId otherProcess);
+                            ProcessId otherProcess) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why);
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 };
 
 class TestBridgeMainSubParent :
     public PTestBridgeMainSubParent
 {
 public:
     TestBridgeMainSubParent(Transport* aTransport)
         : mTransport(aTransport)
     {}
     virtual ~TestBridgeMainSubParent() {}
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvHello();
-    NS_OVERRIDE
-    virtual bool RecvHelloSync();
-    NS_OVERRIDE
-    virtual bool AnswerHelloRpc();
+    virtual bool RecvHello() MOZ_OVERRIDE;
+    virtual bool RecvHelloSync() MOZ_OVERRIDE;
+    virtual bool AnswerHelloRpc() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why);
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
     Transport* mTransport;
 };
 
 //-----------------------------------------------------------------------------
 // "Sub" process --- child of "main"
 //
 class TestBridgeSubParent;
@@ -71,83 +65,73 @@ class TestBridgeSubParent;
 class TestBridgeMainChild :
     public PTestBridgeMainChild
 {
 public:
     TestBridgeMainChild();
     virtual ~TestBridgeMainChild() {}
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvStart();
+    virtual bool RecvStart() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why);
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
     IPDLUnitTestSubprocess* mSubprocess;
 };
 
 class TestBridgeSubParent :
     public PTestBridgeSubParent
 {
 public:
     TestBridgeSubParent() {}
     virtual ~TestBridgeSubParent() {}
 
     void Main();
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvBridgeEm();
+    virtual bool RecvBridgeEm() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why);
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 };
 
 //-----------------------------------------------------------------------------
 // "Subsub" process --- child of "sub"
 //
 class TestBridgeSubChild :
     public PTestBridgeSubChild
 {
 public:
     TestBridgeSubChild();
     virtual ~TestBridgeSubChild() {}
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvPing();
+    virtual bool RecvPing() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual PTestBridgeMainSubChild*
     AllocPTestBridgeMainSub(Transport* transport,
-                            ProcessId otherProcess);
+                            ProcessId otherProcess) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why);
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 };
 
 class TestBridgeMainSubChild :
     public PTestBridgeMainSubChild
 {
 public:
     TestBridgeMainSubChild(Transport* aTransport)
         : mGotHi(false)
         , mTransport(aTransport)
     {}
     virtual ~TestBridgeMainSubChild() {}
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvHi();
-    NS_OVERRIDE
-    virtual bool AnswerHiRpc();
+    virtual bool RecvHi() MOZ_OVERRIDE;
+    virtual bool AnswerHiRpc() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why);
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
     bool mGotHi;
     Transport* mTransport;
 };
 
 } // namespace _ipdltest
 } // namespace mozilla
 
--- a/ipc/ipdl/test/cxx/TestCrashCleanup.h
+++ b/ipc/ipdl/test/cxx/TestCrashCleanup.h
@@ -18,18 +18,17 @@ public:
     virtual ~TestCrashCleanupParent();
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return false; }
 
     void Main();
 
 protected:    
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (AbnormalShutdown != why)
             fail("unexpected destruction!");
         mCleanedUp = true;
     }
 
     bool mCleanedUp;
 };
@@ -38,21 +37,19 @@ protected:
 class TestCrashCleanupChild :
     public PTestCrashCleanupChild
 {
 public:
     TestCrashCleanupChild();
     virtual ~TestCrashCleanupChild();
 
 protected:
-    NS_OVERRIDE
-    virtual bool AnswerDIEDIEDIE();
+    virtual bool AnswerDIEDIEDIE() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         fail("should have 'crashed'!");
     }
 };
 
 
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/TestDataStructures.h
+++ b/ipc/ipdl/test/cxx/TestDataStructures.h
@@ -19,18 +19,17 @@ class TestDataStructuresSub :
         public PTestDataStructuresSubParent,
         public PTestDataStructuresSubChild
 {
 public:
     TestDataStructuresSub(uint32 i) : mI(i)
     { }
     virtual ~TestDataStructuresSub()
     { }
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
       if (Deletion != why)
         fail("unexpected destruction!");
     }
   uint32 mI;
 };
 
 //-----------------------------------------------------------------------------
@@ -44,150 +43,128 @@ public:
     virtual ~TestDataStructuresParent();
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:
-    NS_OVERRIDE
-    virtual PTestDataStructuresSubParent* AllocPTestDataStructuresSub(const int& i)
+    virtual PTestDataStructuresSubParent* AllocPTestDataStructuresSub(const int& i) MOZ_OVERRIDE
     {
         PTestDataStructuresSubParent* actor = new TestDataStructuresSub(i);
         mKids.AppendElement(actor);
         return actor;
     }
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestDataStructuresSub(PTestDataStructuresSubParent* actor);
+    virtual bool DeallocPTestDataStructuresSub(PTestDataStructuresSubParent* actor) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvTest1(
             const InfallibleTArray<int>& i1,
-            InfallibleTArray<int>* o1);
+            InfallibleTArray<int>* o1) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvTest2(
             const InfallibleTArray<PTestDataStructuresSubParent*>& i1,
-            InfallibleTArray<PTestDataStructuresSubParent*>* o1);
+            InfallibleTArray<PTestDataStructuresSubParent*>* o1) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvTest3(
             const IntDouble& i1,
             const IntDouble& i2,
             IntDouble* o1,
-            IntDouble* o2);
+            IntDouble* o2) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvTest4(
             const InfallibleTArray<IntDouble>& i1,
-            InfallibleTArray<IntDouble>* o1);
+            InfallibleTArray<IntDouble>* o1) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvTest5(
             const IntDoubleArrays& i1,
             const IntDoubleArrays& i2,
             const IntDoubleArrays& i3,
             IntDoubleArrays* o1,
             IntDoubleArrays* o2,
-            IntDoubleArrays* o3);
+            IntDoubleArrays* o3) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvTest6(
             const InfallibleTArray<IntDoubleArrays>& i1,
-            InfallibleTArray<IntDoubleArrays>* o1);
+            InfallibleTArray<IntDoubleArrays>* o1) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
+
     virtual bool RecvTest7_0(const ActorWrapper& i1,
-                             ActorWrapper* o1);
+                             ActorWrapper* o1) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvTest7(
             const Actors& i1,
             const Actors& i2,
             const Actors& i3,
             Actors* o1,
             Actors* o2,
-            Actors* o3);
+            Actors* o3) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvTest8(
             const InfallibleTArray<Actors>& i1,
-            InfallibleTArray<Actors>* o1);
+            InfallibleTArray<Actors>* o1) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvTest9(
             const Unions& i1,
             const Unions& i2,
             const Unions& i3,
             const Unions& i4,
             Unions* o1,
             Unions* o2,
             Unions* o3,
-            Unions* o4);
+            Unions* o4) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvTest10(
             const InfallibleTArray<Unions>& i1,
-            InfallibleTArray<Unions>* o1);
+            InfallibleTArray<Unions>* o1) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvTest11(
             const SIntDouble& i,
-            SIntDouble* o);
+            SIntDouble* o) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvTest12(
             const SIntDoubleArrays& i,
-            SIntDoubleArrays* o);
+            SIntDoubleArrays* o) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvTest13(
             const SActors& i,
-            SActors* o);
+            SActors* o) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvTest14(
             const Structs& i,
-            Structs* o);
+            Structs* o) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvTest15(
             const WithStructs& i1,
             const WithStructs& i2,
             const WithStructs& i3,
             const WithStructs& i4,
             const WithStructs& i5,
             WithStructs* o1,
             WithStructs* o2,
             WithStructs* o3,
             WithStructs* o4,
-            WithStructs* o5);
+            WithStructs* o5) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvTest16(
             const WithUnions& i,
-            WithUnions* o);
+            WithUnions* o) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvTest17(const InfallibleTArray<Op>& sa);
+    virtual bool RecvTest17(const InfallibleTArray<Op>& sa) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvTest18(const InfallibleTArray<nsIntRegion>& ra);
+    virtual bool RecvTest18(const InfallibleTArray<nsIntRegion>& ra) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvDummy(const ShmemUnion& su, ShmemUnion* rsu)
+    virtual bool RecvDummy(const ShmemUnion& su, ShmemUnion* rsu) MOZ_OVERRIDE
     {
         *rsu = su;
         return true;
     }
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 
 private:
@@ -198,36 +175,32 @@ private:
 class TestDataStructuresChild :
     public PTestDataStructuresChild
 {
 public:
     TestDataStructuresChild();
     virtual ~TestDataStructuresChild();
 
 protected:
-    NS_OVERRIDE
-    virtual PTestDataStructuresSubChild* AllocPTestDataStructuresSub(const int& i)
+    virtual PTestDataStructuresSubChild* AllocPTestDataStructuresSub(const int& i) MOZ_OVERRIDE
     {
         PTestDataStructuresSubChild* actor = new TestDataStructuresSub(i);
         mKids.AppendElement(actor);
         return actor;
     }
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestDataStructuresSub(PTestDataStructuresSubChild* actor)
+    virtual bool DeallocPTestDataStructuresSub(PTestDataStructuresSubChild* actor) MOZ_OVERRIDE
     {
         delete actor;
         return true;
     }
 
-    NS_OVERRIDE
-    virtual bool RecvStart();
+    virtual bool RecvStart() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 
 private:
     void Test1();
--- a/ipc/ipdl/test/cxx/TestDesc.h
+++ b/ipc/ipdl/test/cxx/TestDesc.h
@@ -25,27 +25,23 @@ public:
     TestDescParent() { }
     virtual ~TestDescParent() { }
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
-    NS_OVERRIDE
-    virtual bool RecvOk(PTestDescSubsubParent* a);
+    virtual bool RecvOk(PTestDescSubsubParent* a) MOZ_OVERRIDE;
 
 protected:
-    NS_OVERRIDE
-    virtual PTestDescSubParent* AllocPTestDescSub(PTestDescSubsubParent*);
-    NS_OVERRIDE
-    virtual bool DeallocPTestDescSub(PTestDescSubParent* actor);
+    virtual PTestDescSubParent* AllocPTestDescSub(PTestDescSubsubParent*) MOZ_OVERRIDE;
+    virtual bool DeallocPTestDescSub(PTestDescSubParent* actor) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 };
 
@@ -53,27 +49,23 @@ protected:
 class TestDescChild :
     public PTestDescChild
 {
 public:
     TestDescChild() { }
     virtual ~TestDescChild() { }
 
 protected:
-    NS_OVERRIDE
-    virtual PTestDescSubChild* AllocPTestDescSub(PTestDescSubsubChild*);
+    virtual PTestDescSubChild* AllocPTestDescSub(PTestDescSubsubChild*) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestDescSub(PTestDescSubChild* actor);
+    virtual bool DeallocPTestDescSub(PTestDescSubChild* actor) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvTest(PTestDescSubsubChild* a);
+    virtual bool RecvTest(PTestDescSubsubChild* a) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 };
 
 
@@ -83,36 +75,32 @@ protected:
 class TestDescSubParent :
     public PTestDescSubParent
 {
 public:
     TestDescSubParent() { }
     virtual ~TestDescSubParent() { }
 
 protected:
-    NS_OVERRIDE
-    virtual PTestDescSubsubParent* AllocPTestDescSubsub();
+    virtual PTestDescSubsubParent* AllocPTestDescSubsub() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestDescSubsub(PTestDescSubsubParent* actor);
+    virtual bool DeallocPTestDescSubsub(PTestDescSubsubParent* actor) MOZ_OVERRIDE;
 };
 
 
 class TestDescSubChild :
     public PTestDescSubChild
 {
 public:
     TestDescSubChild() { }
     virtual ~TestDescSubChild() { }
 
 protected:
-    NS_OVERRIDE
-    virtual PTestDescSubsubChild* AllocPTestDescSubsub();
-    NS_OVERRIDE
-    virtual bool DeallocPTestDescSubsub(PTestDescSubsubChild* actor);
+    virtual PTestDescSubsubChild* AllocPTestDescSubsub() MOZ_OVERRIDE;
+    virtual bool DeallocPTestDescSubsub(PTestDescSubsubChild* actor) MOZ_OVERRIDE;
 };
 
 
 //-----------------------------------------------------------------------------
 // Grand-descendent
 //
 class TestDescSubsubParent :
     public PTestDescSubsubParent
--- a/ipc/ipdl/test/cxx/TestFailedCtor.h
+++ b/ipc/ipdl/test/cxx/TestFailedCtor.h
@@ -30,23 +30,20 @@ public:
     // FIXME/bug 703322 Disabled because child calls exit() to end
     //                  test, not clear how to handle failed ctor in
     //                  threaded mode.
     static bool RunTestInThreads() { return false; }
 
     void Main();
 
 protected:
-    NS_OVERRIDE
-    virtual PTestFailedCtorSubParent* AllocPTestFailedCtorSub();
-    NS_OVERRIDE
-    virtual bool DeallocPTestFailedCtorSub(PTestFailedCtorSubParent* actor);
+    virtual PTestFailedCtorSubParent* AllocPTestFailedCtorSub() MOZ_OVERRIDE;
+    virtual bool DeallocPTestFailedCtorSub(PTestFailedCtorSubParent* actor) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (AbnormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 };
 
@@ -54,30 +51,25 @@ protected:
 class TestFailedCtorChild :
     public PTestFailedCtorChild
 {
 public:
     TestFailedCtorChild() { }
     virtual ~TestFailedCtorChild() { }
 
 protected:
-    NS_OVERRIDE
-    virtual PTestFailedCtorSubChild* AllocPTestFailedCtorSub();
+    virtual PTestFailedCtorSubChild* AllocPTestFailedCtorSub() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool AnswerPTestFailedCtorSubConstructor(PTestFailedCtorSubChild* actor);
+    virtual bool AnswerPTestFailedCtorSubConstructor(PTestFailedCtorSubChild* actor) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestFailedCtorSub(PTestFailedCtorSubChild* actor);
+    virtual bool DeallocPTestFailedCtorSub(PTestFailedCtorSubChild* actor) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ProcessingError(Result what);
+    virtual void ProcessingError(Result what) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         fail("should have _exit()ed");
     }
 };
 
 
 //-----------------------------------------------------------------------------
 // First descendent
@@ -87,64 +79,56 @@ class TestFailedCtorSubsub;
 class TestFailedCtorSubParent :
     public PTestFailedCtorSubParent
 {
 public:
     TestFailedCtorSubParent() : mOne(NULL), mTwo(NULL), mThree(NULL) { }
     virtual ~TestFailedCtorSubParent();
 
 protected:
-    NS_OVERRIDE
-    virtual PTestFailedCtorSubsubParent* AllocPTestFailedCtorSubsub();
+    virtual PTestFailedCtorSubsubParent* AllocPTestFailedCtorSubsub() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestFailedCtorSubsub(PTestFailedCtorSubsubParent* actor);
-    NS_OVERRIDE
-    virtual bool RecvSync() { return true; }
+    virtual bool DeallocPTestFailedCtorSubsub(PTestFailedCtorSubsubParent* actor) MOZ_OVERRIDE;
+    virtual bool RecvSync() MOZ_OVERRIDE { return true; }
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why);
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
     TestFailedCtorSubsub* mOne;
     TestFailedCtorSubsub* mTwo;
     TestFailedCtorSubsub* mThree;
 };
 
 
 class TestFailedCtorSubChild :
     public PTestFailedCtorSubChild
 {
 public:
     TestFailedCtorSubChild() { }
     virtual ~TestFailedCtorSubChild() { }
 
 protected:
-    NS_OVERRIDE
-    virtual PTestFailedCtorSubsubChild* AllocPTestFailedCtorSubsub();
-    NS_OVERRIDE
-    virtual bool DeallocPTestFailedCtorSubsub(PTestFailedCtorSubsubChild* actor);
+    virtual PTestFailedCtorSubsubChild* AllocPTestFailedCtorSubsub() MOZ_OVERRIDE;
+    virtual bool DeallocPTestFailedCtorSubsub(PTestFailedCtorSubsubChild* actor) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why);
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 };
 
 
 //-----------------------------------------------------------------------------
 // Grand-descendent
 //
 class TestFailedCtorSubsub :
         public PTestFailedCtorSubsubParent,
         public PTestFailedCtorSubsubChild
 {
 public:
     TestFailedCtorSubsub() : mWhy(ActorDestroyReason(-1)), mDealloced(false) {}
     virtual ~TestFailedCtorSubsub() {}
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why) { mWhy = why; }
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE { mWhy = why; }
 
     ActorDestroyReason mWhy;
     bool mDealloced;
 };
 
 
 }
 }
--- a/ipc/ipdl/test/cxx/TestHangs.h
+++ b/ipc/ipdl/test/cxx/TestHangs.h
@@ -21,29 +21,25 @@ public:
 
     // FIXME/bug 703320 Disabled because parent kills child proc, not
     //                  clear how that should work in threads.
     static bool RunTestInThreads() { return false; }
 
     void Main();
 
 protected:
-    NS_OVERRIDE
-    virtual bool ShouldContinueFromReplyTimeout();
+    virtual bool ShouldContinueFromReplyTimeout() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool RecvNonce() {
         return true;
     }
 
-    NS_OVERRIDE
-    virtual bool AnswerStackFrame();
+    virtual bool AnswerStackFrame() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (AbnormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 
     void CleanUp();
@@ -55,36 +51,32 @@ protected:
 class TestHangsChild :
     public PTestHangsChild
 {
 public:
     TestHangsChild();
     virtual ~TestHangsChild();
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvStart() {
+    virtual bool RecvStart() MOZ_OVERRIDE {
         if (!SendNonce())
             fail("sending Nonce");
         return true;
     }
 
-    NS_OVERRIDE
-    virtual bool AnswerStackFrame()
+    virtual bool AnswerStackFrame() MOZ_OVERRIDE
     {
         if (CallStackFrame())
             fail("should have failed");
         return true;
     }
 
-    NS_OVERRIDE
-    virtual bool AnswerHang();
+    virtual bool AnswerHang() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (AbnormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 };
 
 
--- a/ipc/ipdl/test/cxx/TestJSON.h
+++ b/ipc/ipdl/test/cxx/TestJSON.h
@@ -28,36 +28,32 @@ public:
     virtual ~TestJSONParent() { }
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:
-    NS_OVERRIDE
     virtual bool
     RecvTest(const JSONVariant& i,
-             JSONVariant* o);
+             JSONVariant* o) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual PTestHandleParent* AllocPTestHandle()
+    virtual PTestHandleParent* AllocPTestHandle() MOZ_OVERRIDE
     {
         return mKid = new TestHandleParent();
     }
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestHandle(PTestHandleParent* actor)
+    virtual bool DeallocPTestHandle(PTestHandleParent* actor) MOZ_OVERRIDE
     {
         delete actor;
         return true;
     }
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 
     PTestHandleParent* mKid;
@@ -75,35 +71,31 @@ public:
 class TestJSONChild :
     public PTestJSONChild
 {
 public:
     TestJSONChild() { }
     virtual ~TestJSONChild() { }
 
 protected:
-    NS_OVERRIDE
     virtual bool
-    RecvStart();
+    RecvStart() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual PTestHandleChild* AllocPTestHandle()
+    virtual PTestHandleChild* AllocPTestHandle() MOZ_OVERRIDE
     {
         return mKid = new TestHandleChild();
     }
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestHandle(PTestHandleChild* actor)
+    virtual bool DeallocPTestHandle(PTestHandleChild* actor) MOZ_OVERRIDE
     {
         delete actor;
         return true;
     }
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 
     PTestHandleChild* mKid;
 };
--- a/ipc/ipdl/test/cxx/TestLatency.h
+++ b/ipc/ipdl/test/cxx/TestLatency.h
@@ -26,23 +26,20 @@ public:
     virtual ~TestLatencyParent();
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvPong();
-    NS_OVERRIDE
-    virtual bool RecvPong5();
+    virtual bool RecvPong() MOZ_OVERRIDE;
+    virtual bool RecvPong5() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
 
         passed("\n"
                "  average #ping-pong/sec:        %g\n"
                "  average #ping5-pong5/sec:      %g\n"
                "  average #RPC call-answer/sec:  %g\n"
@@ -77,29 +74,23 @@ private:
 class TestLatencyChild :
     public PTestLatencyChild
 {
 public:
     TestLatencyChild();
     virtual ~TestLatencyChild();
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvPing();
-    NS_OVERRIDE
-    virtual bool RecvPing5();
-    NS_OVERRIDE
-    virtual bool AnswerRpc();
-    NS_OVERRIDE
-    virtual bool RecvSpam();
-    NS_OVERRIDE
-    virtual bool AnswerSynchro();
+    virtual bool RecvPing() MOZ_OVERRIDE;
+    virtual bool RecvPing5() MOZ_OVERRIDE;
+    virtual bool AnswerRpc() MOZ_OVERRIDE;
+    virtual bool RecvSpam() MOZ_OVERRIDE;
+    virtual bool AnswerSynchro() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 };
 
 
--- a/ipc/ipdl/test/cxx/TestManyChildAllocs.h
+++ b/ipc/ipdl/test/cxx/TestManyChildAllocs.h
@@ -22,25 +22,21 @@ public:
     virtual ~TestManyChildAllocsParent();
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvDone();
-    NS_OVERRIDE
-    virtual bool DeallocPTestManyChildAllocsSub(PTestManyChildAllocsSubParent* __a);
-    NS_OVERRIDE
-    virtual PTestManyChildAllocsSubParent* AllocPTestManyChildAllocsSub();
+    virtual bool RecvDone() MOZ_OVERRIDE;
+    virtual bool DeallocPTestManyChildAllocsSub(PTestManyChildAllocsSubParent* __a) MOZ_OVERRIDE;
+    virtual PTestManyChildAllocsSubParent* AllocPTestManyChildAllocsSub() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         passed("ok");
         QuitParent();
     }
 };
 
@@ -48,25 +44,21 @@ protected:
 class TestManyChildAllocsChild :
     public PTestManyChildAllocsChild
 {
 public:
     TestManyChildAllocsChild();
     virtual ~TestManyChildAllocsChild();
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvGo();
-    NS_OVERRIDE
-    virtual bool DeallocPTestManyChildAllocsSub(PTestManyChildAllocsSubChild* __a);
-    NS_OVERRIDE
-    virtual PTestManyChildAllocsSubChild* AllocPTestManyChildAllocsSub();
+    virtual bool RecvGo() MOZ_OVERRIDE;
+    virtual bool DeallocPTestManyChildAllocsSub(PTestManyChildAllocsSubChild* __a) MOZ_OVERRIDE;
+    virtual PTestManyChildAllocsSubChild* AllocPTestManyChildAllocsSub() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 };
 
 
@@ -75,18 +67,17 @@ protected:
 class TestManyChildAllocsSubParent :
     public PTestManyChildAllocsSubParent
 {
 public:
     TestManyChildAllocsSubParent() { }
     virtual ~TestManyChildAllocsSubParent() { }
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvHello() { return true; }
+    virtual bool RecvHello() MOZ_OVERRIDE { return true; }
 };
 
 
 class TestManyChildAllocsSubChild :
     public PTestManyChildAllocsSubChild
 {
 public:
     TestManyChildAllocsSubChild() { }
--- a/ipc/ipdl/test/cxx/TestMultiMgrs.h
+++ b/ipc/ipdl/test/cxx/TestMultiMgrs.h
@@ -35,24 +35,22 @@ public:
     virtual ~TestMultiMgrsLeftParent() { }
 
     bool HasChild(TestMultiMgrsBottomParent* c)
     {
         return ManagedPTestMultiMgrsBottomParent().Contains(c);
     }
 
 protected:
-    NS_OVERRIDE
-    virtual PTestMultiMgrsBottomParent* AllocPTestMultiMgrsBottom()
+    virtual PTestMultiMgrsBottomParent* AllocPTestMultiMgrsBottom() MOZ_OVERRIDE
     {
         return new TestMultiMgrsBottomParent();
     }
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestMultiMgrsBottom(PTestMultiMgrsBottomParent* actor)
+    virtual bool DeallocPTestMultiMgrsBottom(PTestMultiMgrsBottomParent* actor) MOZ_OVERRIDE
     {
         delete actor;
         return true;
     }
 };
 
 class TestMultiMgrsRightParent :
     public PTestMultiMgrsRightParent
@@ -62,24 +60,22 @@ public:
     virtual ~TestMultiMgrsRightParent() { }
 
     bool HasChild(TestMultiMgrsBottomParent* c)
     {
         return ManagedPTestMultiMgrsBottomParent().Contains(c);
     }
 
 protected:
-    NS_OVERRIDE
-    virtual PTestMultiMgrsBottomParent* AllocPTestMultiMgrsBottom()
+    virtual PTestMultiMgrsBottomParent* AllocPTestMultiMgrsBottom() MOZ_OVERRIDE
     {
         return new TestMultiMgrsBottomParent();
     }
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestMultiMgrsBottom(PTestMultiMgrsBottomParent* actor)
+    virtual bool DeallocPTestMultiMgrsBottom(PTestMultiMgrsBottomParent* actor) MOZ_OVERRIDE
     {
         delete actor;
         return true;
     }
 };
 
 class TestMultiMgrsParent :
     public PTestMultiMgrsParent
@@ -89,47 +85,41 @@ public:
     virtual ~TestMultiMgrsParent() { }
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvOK();
+    virtual bool RecvOK() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual PTestMultiMgrsLeftParent* AllocPTestMultiMgrsLeft()
+    virtual PTestMultiMgrsLeftParent* AllocPTestMultiMgrsLeft() MOZ_OVERRIDE
     {
         return new TestMultiMgrsLeftParent();
     }
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestMultiMgrsLeft(PTestMultiMgrsLeftParent* actor)
+    virtual bool DeallocPTestMultiMgrsLeft(PTestMultiMgrsLeftParent* actor) MOZ_OVERRIDE
     {
         delete actor;
         return true;
     }
 
-    NS_OVERRIDE
-    virtual PTestMultiMgrsRightParent* AllocPTestMultiMgrsRight()
+    virtual PTestMultiMgrsRightParent* AllocPTestMultiMgrsRight() MOZ_OVERRIDE
     {
         return new TestMultiMgrsRightParent();
     }
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestMultiMgrsRight(PTestMultiMgrsRightParent* actor)
+    virtual bool DeallocPTestMultiMgrsRight(PTestMultiMgrsRightParent* actor) MOZ_OVERRIDE
     {
         delete actor;
         return true;
     }
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 };
 
@@ -153,27 +143,24 @@ public:
     virtual ~TestMultiMgrsLeftChild() { }
 
     bool HasChild(PTestMultiMgrsBottomChild* c)
     {
         return ManagedPTestMultiMgrsBottomChild().Contains(c);
     }
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvPTestMultiMgrsBottomConstructor(PTestMultiMgrsBottomChild* actor);
+    virtual bool RecvPTestMultiMgrsBottomConstructor(PTestMultiMgrsBottomChild* actor) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual PTestMultiMgrsBottomChild* AllocPTestMultiMgrsBottom()
+    virtual PTestMultiMgrsBottomChild* AllocPTestMultiMgrsBottom() MOZ_OVERRIDE
     {
         return new TestMultiMgrsBottomChild();
     }
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestMultiMgrsBottom(PTestMultiMgrsBottomChild* actor)
+    virtual bool DeallocPTestMultiMgrsBottom(PTestMultiMgrsBottomChild* actor) MOZ_OVERRIDE
     {
         delete actor;
         return true;
     }
 };
 
 class TestMultiMgrsRightChild :
     public PTestMultiMgrsRightChild
@@ -183,27 +170,24 @@ public:
     virtual ~TestMultiMgrsRightChild() { }
 
     bool HasChild(PTestMultiMgrsBottomChild* c)
     {
         return ManagedPTestMultiMgrsBottomChild().Contains(c);
     }
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvPTestMultiMgrsBottomConstructor(PTestMultiMgrsBottomChild* actor);
+    virtual bool RecvPTestMultiMgrsBottomConstructor(PTestMultiMgrsBottomChild* actor) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual PTestMultiMgrsBottomChild* AllocPTestMultiMgrsBottom()
+    virtual PTestMultiMgrsBottomChild* AllocPTestMultiMgrsBottom() MOZ_OVERRIDE
     {
         return new TestMultiMgrsBottomChild();
     }
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestMultiMgrsBottom(PTestMultiMgrsBottomChild* actor)
+    virtual bool DeallocPTestMultiMgrsBottom(PTestMultiMgrsBottomChild* actor) MOZ_OVERRIDE
     {
         delete actor;
         return true;
     }
 };
 
 class TestMultiMgrsChild :
     public PTestMultiMgrsChild
@@ -213,47 +197,41 @@ public:
     virtual ~TestMultiMgrsChild() { }
 
     void Main();
 
     PTestMultiMgrsBottomChild* mBottomL;
     PTestMultiMgrsBottomChild* mBottomR;
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvCheck();
+    virtual bool RecvCheck() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual PTestMultiMgrsLeftChild* AllocPTestMultiMgrsLeft()
+    virtual PTestMultiMgrsLeftChild* AllocPTestMultiMgrsLeft() MOZ_OVERRIDE
     {
         return new TestMultiMgrsLeftChild();
     }
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestMultiMgrsLeft(PTestMultiMgrsLeftChild* actor)
+    virtual bool DeallocPTestMultiMgrsLeft(PTestMultiMgrsLeftChild* actor) MOZ_OVERRIDE
     {
         delete actor;
         return true;
     }
 
-    NS_OVERRIDE
-    virtual PTestMultiMgrsRightChild* AllocPTestMultiMgrsRight()
+    virtual PTestMultiMgrsRightChild* AllocPTestMultiMgrsRight() MOZ_OVERRIDE
     {
         return new TestMultiMgrsRightChild();
     }
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestMultiMgrsRight(PTestMultiMgrsRightChild* actor)
+    virtual bool DeallocPTestMultiMgrsRight(PTestMultiMgrsRightChild* actor) MOZ_OVERRIDE
     {
         delete actor;
         return true;
     }
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitChild();
     }
 };
 
--- a/ipc/ipdl/test/cxx/TestNestedLoops.h
+++ b/ipc/ipdl/test/cxx/TestNestedLoops.h
@@ -18,23 +18,21 @@ public:
     virtual ~TestNestedLoopsParent();
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:    
-    NS_OVERRIDE
-    virtual bool RecvNonce();
+    virtual bool RecvNonce() MOZ_OVERRIDE;
 
     void BreakNestedLoop();
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 
     bool mBreakNestedLoop;
@@ -44,24 +42,21 @@ protected:
 class TestNestedLoopsChild :
     public PTestNestedLoopsChild
 {
 public:
     TestNestedLoopsChild();
     virtual ~TestNestedLoopsChild();
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvStart();
+    virtual bool RecvStart() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool AnswerR();
+    virtual bool AnswerR() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 };
 
 
--- a/ipc/ipdl/test/cxx/TestOpens.h
+++ b/ipc/ipdl/test/cxx/TestOpens.h
@@ -22,46 +22,40 @@ public:
     virtual ~TestOpensParent() {}
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return false; }
 
     void Main();
 
 protected:
-    NS_OVERRIDE
     virtual PTestOpensOpenedParent*
-    AllocPTestOpensOpened(Transport* transport, ProcessId otherProcess);
+    AllocPTestOpensOpened(Transport* transport, ProcessId otherProcess) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why);
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 };
 
 } // namespace _ipdltest
 
 namespace _ipdltest2 {
 
 class TestOpensOpenedParent : public PTestOpensOpenedParent
 {
 public:
     TestOpensOpenedParent(Transport* aTransport)
         : mTransport(aTransport)
     {}
     virtual ~TestOpensOpenedParent() {}
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvHello();
-    NS_OVERRIDE
-    virtual bool RecvHelloSync();
-    NS_OVERRIDE
-    virtual bool AnswerHelloRpc();
+    virtual bool RecvHello() MOZ_OVERRIDE;
+    virtual bool RecvHelloSync() MOZ_OVERRIDE;
+    virtual bool AnswerHelloRpc() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why);
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
     Transport* mTransport;
 };
 
 } // namespace _ipdltest2
 
 // child process
 
@@ -69,48 +63,42 @@ namespace _ipdltest {
 
 class TestOpensChild : public PTestOpensChild
 {
 public:
     TestOpensChild();
     virtual ~TestOpensChild() {}
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvStart();
+    virtual bool RecvStart() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual PTestOpensOpenedChild*
-    AllocPTestOpensOpened(Transport* transport, ProcessId otherProcess);
+    AllocPTestOpensOpened(Transport* transport, ProcessId otherProcess) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why);
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 };
 
 } // namespace _ipdltest
 
 namespace _ipdltest2 {
 
 class TestOpensOpenedChild : public PTestOpensOpenedChild
 {
 public:
     TestOpensOpenedChild(Transport* aTransport)
         : mGotHi(false)
         , mTransport(aTransport)
     {}
     virtual ~TestOpensOpenedChild() {}
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvHi();
-    NS_OVERRIDE
-    virtual bool AnswerHiRpc();
+    virtual bool RecvHi() MOZ_OVERRIDE;
+    virtual bool AnswerHiRpc() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why);
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
     bool mGotHi;
     Transport* mTransport;
 };
 
 } // namespace _ipdltest2
 
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/TestRPCErrorCleanup.h
+++ b/ipc/ipdl/test/cxx/TestRPCErrorCleanup.h
@@ -19,43 +19,39 @@ public:
 
     static bool RunTestInProcesses() { return true; }
     // FIXME/bug 703323 Could work if modified
     static bool RunTestInThreads() { return false; }
 
     void Main();
 
 protected:    
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (AbnormalShutdown != why)
             fail("unexpected destruction!");  
     }
 
-    NS_OVERRIDE
-    virtual void ProcessingError(Result what);
+    virtual void ProcessingError(Result what) MOZ_OVERRIDE;
 
     bool mGotProcessingError;
 };
 
 
 class TestRPCErrorCleanupChild :
     public PTestRPCErrorCleanupChild
 {
 public:
     TestRPCErrorCleanupChild();
     virtual ~TestRPCErrorCleanupChild();
 
 protected:
-    NS_OVERRIDE
-    virtual bool AnswerError();
+    virtual bool AnswerError() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         fail("should have 'crashed'!");
     }
 };
 
 
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/TestRPCRaces.h
+++ b/ipc/ipdl/test/cxx/TestRPCRaces.h
@@ -24,49 +24,41 @@ public:
     virtual ~TestRPCRacesParent() { }
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:
-    NS_OVERRIDE
     virtual bool
-    RecvStartRace();
+    RecvStartRace() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool
-    AnswerRace(bool* hasRace);
+    AnswerRace(bool* hasRace) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool
-    AnswerStackFrame();
+    AnswerStackFrame() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool
-    AnswerStackFrame3();
+    AnswerStackFrame3() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool
-    AnswerParent();
+    AnswerParent() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool
-    RecvGetAnsweredParent(bool* answeredParent);
+    RecvGetAnsweredParent(bool* answeredParent) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual mozilla::ipc::RPCChannel::RacyRPCPolicy
-    MediateRPCRace(const Message& parent, const Message& child)
+    MediateRPCRace(const Message& parent, const Message& child) MOZ_OVERRIDE
     {
         return MediateRace(parent, child);
     }
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         if (!(mHasReply && mChildHasReply))
             fail("both sides should have replies!");
         passed("ok");
         QuitParent();
     }
@@ -86,53 +78,44 @@ private:
 class TestRPCRacesChild :
     public PTestRPCRacesChild
 {
 public:
     TestRPCRacesChild() : mHasReply(false) { }
     virtual ~TestRPCRacesChild() { }
 
 protected:
-    NS_OVERRIDE
     virtual bool
-    RecvStart();
+    RecvStart() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool
-    AnswerRace(bool* hasRace);
+    AnswerRace(bool* hasRace) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool
-    AnswerStackFrame();
+    AnswerStackFrame() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool
-    AnswerStackFrame3();
+    AnswerStackFrame3() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool
-    RecvWakeup();
+    RecvWakeup() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool
-    RecvWakeup3();
+    RecvWakeup3() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual bool
-    AnswerChild();
+    AnswerChild() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual mozilla::ipc::RPCChannel::RacyRPCPolicy
-    MediateRPCRace(const Message& parent, const Message& child)
+    MediateRPCRace(const Message& parent, const Message& child) MOZ_OVERRIDE
     {
         return MediateRace(parent, child);
     }
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 
 private:
     bool mHasReply;
--- a/ipc/ipdl/test/cxx/TestRPCShutdownRace.h
+++ b/ipc/ipdl/test/cxx/TestRPCShutdownRace.h
@@ -18,50 +18,44 @@ public:
     virtual ~TestRPCShutdownRaceParent();
 
     static bool RunTestInProcesses() { return true; }
     // FIXME/bug 703323 Could work if modified
     static bool RunTestInThreads() { return false; }
 
     void Main();
 
-    NS_OVERRIDE
-    virtual bool RecvStartDeath();
+    virtual bool RecvStartDeath() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvOrphan();
+    virtual bool RecvOrphan() MOZ_OVERRIDE;
 
 protected:
     void StartShuttingDown();
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (AbnormalShutdown != why)
             fail("unexpected destruction!");  
     }
 };
 
 
 class TestRPCShutdownRaceChild :
     public PTestRPCShutdownRaceChild
 {
 public:
     TestRPCShutdownRaceChild();
     virtual ~TestRPCShutdownRaceChild();
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvStart();
+    virtual bool RecvStart() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool AnswerExit();
+    virtual bool AnswerExit() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         fail("should have 'crashed'!");
     }
 };
 
 
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/TestRaceDeferral.h
+++ b/ipc/ipdl/test/cxx/TestRaceDeferral.h
@@ -19,25 +19,22 @@ public:
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:
     void Test1();
 
-    NS_OVERRIDE
-    virtual bool AnswerLose();
+    virtual bool AnswerLose() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual mozilla::ipc::RPCChannel::RacyRPCPolicy
-    MediateRPCRace(const Message& parent, const Message& child);
+    MediateRPCRace(const Message& parent, const Message& child) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 
     bool mProcessedLose;
@@ -47,31 +44,26 @@ protected:
 class TestRaceDeferralChild :
     public PTestRaceDeferralChild
 {
 public:
     TestRaceDeferralChild();
     virtual ~TestRaceDeferralChild();
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvStartRace();
+    virtual bool RecvStartRace() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool AnswerWin();
+    virtual bool AnswerWin() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool AnswerRpc();
+    virtual bool AnswerRpc() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual mozilla::ipc::RPCChannel::RacyRPCPolicy
-    MediateRPCRace(const Message& parent, const Message& child);
+    MediateRPCRace(const Message& parent, const Message& child) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 };
 
 
--- a/ipc/ipdl/test/cxx/TestRacyRPCReplies.h
+++ b/ipc/ipdl/test/cxx/TestRacyRPCReplies.h
@@ -18,24 +18,21 @@ public:
     virtual ~TestRacyRPCRepliesParent();
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:    
-    NS_OVERRIDE
-    virtual bool RecvA_();
+    virtual bool RecvA_() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool Answer_R(int* replyNum);
+    virtual bool Answer_R(int* replyNum) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 
 private:
@@ -46,27 +43,23 @@ private:
 class TestRacyRPCRepliesChild :
     public PTestRacyRPCRepliesChild
 {
 public:
     TestRacyRPCRepliesChild();
     virtual ~TestRacyRPCRepliesChild();
 
 protected:
-    NS_OVERRIDE
-    virtual bool AnswerR_(int* replyNum);
+    virtual bool AnswerR_(int* replyNum) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvChildTest();
+    virtual bool RecvChildTest() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool Recv_A();
+    virtual bool Recv_A() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 
 private:
     int mReplyNum;
--- a/ipc/ipdl/test/cxx/TestRacyReentry.h
+++ b/ipc/ipdl/test/cxx/TestRacyReentry.h
@@ -18,21 +18,19 @@ public:
     virtual ~TestRacyReentryParent();
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:
-    NS_OVERRIDE
-    virtual bool AnswerE();
+    virtual bool AnswerE() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 
     bool mRecvdE;
@@ -42,27 +40,23 @@ protected:
 class TestRacyReentryChild :
     public PTestRacyReentryChild
 {
 public:
     TestRacyReentryChild();
     virtual ~TestRacyReentryChild();
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvStart();
+    virtual bool RecvStart() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvN();
+    virtual bool RecvN() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool AnswerH();
+    virtual bool AnswerH() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 };
 
 
--- a/ipc/ipdl/test/cxx/TestRacyUndefer.h
+++ b/ipc/ipdl/test/cxx/TestRacyUndefer.h
@@ -18,27 +18,23 @@ public:
     virtual ~TestRacyUndeferParent();
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:    
-    NS_OVERRIDE
-    virtual bool AnswerSpam();
+    virtual bool AnswerSpam() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool AnswerRaceWinTwice();
+    virtual bool AnswerRaceWinTwice() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvDone();
+    virtual bool RecvDone() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 };
 
@@ -46,29 +42,24 @@ protected:
 class TestRacyUndeferChild :
     public PTestRacyUndeferChild
 {
 public:
     TestRacyUndeferChild();
     virtual ~TestRacyUndeferChild();
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvStart();
+    virtual bool RecvStart() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvAwakenSpam();
-    NS_OVERRIDE
-    virtual bool RecvAwakenRaceWinTwice();
+    virtual bool RecvAwakenSpam() MOZ_OVERRIDE;
+    virtual bool RecvAwakenRaceWinTwice() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool AnswerRace();
+    virtual bool AnswerRace() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 };
 
 
--- a/ipc/ipdl/test/cxx/TestSanity.h
+++ b/ipc/ipdl/test/cxx/TestSanity.h
@@ -18,22 +18,20 @@ public:
     virtual ~TestSanityParent();
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:    
-    NS_OVERRIDE
     virtual bool RecvPong(const int& one, const float& zeroPtTwoFive,
-                          const PRUint8& dummy);
+                          const PRUint8& dummy) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 };
 
@@ -41,22 +39,20 @@ protected:
 class TestSanityChild :
     public PTestSanityChild
 {
 public:
     TestSanityChild();
     virtual ~TestSanityChild();
 
 protected:
-    NS_OVERRIDE
     virtual bool RecvPing(const int& zero, const float& zeroPtFive,
-                          const PRInt8& dummy);
+                          const PRInt8& dummy) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 };
 
 
--- a/ipc/ipdl/test/cxx/TestSelfManageRoot.h
+++ b/ipc/ipdl/test/cxx/TestSelfManageRoot.h
@@ -24,28 +24,25 @@ public:
     }
     virtual ~TestSelfManageParent() {
         MOZ_COUNT_DTOR(TestSelfManageParent);
     }
 
     ActorDestroyReason mWhy;
 
 protected:    
-    NS_OVERRIDE
-    virtual PTestSelfManageParent* AllocPTestSelfManage() {
+    virtual PTestSelfManageParent* AllocPTestSelfManage() MOZ_OVERRIDE {
         return new TestSelfManageParent();
     }
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestSelfManage(PTestSelfManageParent* a) {
+    virtual bool DeallocPTestSelfManage(PTestSelfManageParent* a) MOZ_OVERRIDE {
         return true;
     }
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why) {
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE {
         mWhy = why;
     }
 };
 
 class TestSelfManageRootParent :
     public PTestSelfManageRootParent
 {
 public:
@@ -57,28 +54,25 @@ public:
     }
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:    
-    NS_OVERRIDE
-    virtual PTestSelfManageParent* AllocPTestSelfManage() {
+    virtual PTestSelfManageParent* AllocPTestSelfManage() MOZ_OVERRIDE {
         return new TestSelfManageParent();
     }
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestSelfManage(PTestSelfManageParent* a) {
+    virtual bool DeallocPTestSelfManage(PTestSelfManageParent* a) MOZ_OVERRIDE {
         return true;
     }
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 };
 
@@ -92,58 +86,52 @@ public:
     TestSelfManageChild() {
         MOZ_COUNT_CTOR(TestSelfManageChild);
     }
     virtual ~TestSelfManageChild() {
         MOZ_COUNT_DTOR(TestSelfManageChild);
     }
 
 protected:    
-    NS_OVERRIDE
-    virtual PTestSelfManageChild* AllocPTestSelfManage() {
+    virtual PTestSelfManageChild* AllocPTestSelfManage() MOZ_OVERRIDE {
         return new TestSelfManageChild();
     }
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestSelfManage(PTestSelfManageChild* a) {
+    virtual bool DeallocPTestSelfManage(PTestSelfManageChild* a) MOZ_OVERRIDE {
         delete a;
         return true;
     }
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why) { }
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE { }
 };
 
 class TestSelfManageRootChild :
     public PTestSelfManageRootChild
 {
 public:
     TestSelfManageRootChild() {
         MOZ_COUNT_CTOR(TestSelfManageRootChild);
     }
     virtual ~TestSelfManageRootChild() {
         MOZ_COUNT_DTOR(TestSelfManageRootChild);
     }
 
     void Main();
 
 protected:    
-    NS_OVERRIDE
-    virtual PTestSelfManageChild* AllocPTestSelfManage() {
+    virtual PTestSelfManageChild* AllocPTestSelfManage() MOZ_OVERRIDE {
         return new TestSelfManageChild();
     }
 
-    NS_OVERRIDE
-    virtual bool DeallocPTestSelfManage(PTestSelfManageChild* a) {
+    virtual bool DeallocPTestSelfManage(PTestSelfManageChild* a) MOZ_OVERRIDE {
         delete a;
         return true;
     }
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         QuitChild();
     }
 };
 
 } // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/TestShmem.h
+++ b/ipc/ipdl/test/cxx/TestShmem.h
@@ -18,24 +18,22 @@ public:
     virtual ~TestShmemParent() { }
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:
-    NS_OVERRIDE
     virtual bool RecvTake(
             Shmem& mem,
             Shmem& unsafe,
-            const size_t& expectedSize);
+            const size_t& expectedSize) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 };
 
@@ -43,24 +41,22 @@ protected:
 class TestShmemChild :
     public PTestShmemChild
 {
 public:
     TestShmemChild() { }
     virtual ~TestShmemChild() { }
 
 protected:
-    NS_OVERRIDE
     virtual bool RecvGive(
             Shmem& mem,
             Shmem& unsafe,
-            const size_t& expectedSize);
+            const size_t& expectedSize) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 };
 
 
--- a/ipc/ipdl/test/cxx/TestShutdown.h
+++ b/ipc/ipdl/test/cxx/TestShutdown.h
@@ -27,19 +27,18 @@ public:
     {
     }
 
     virtual ~TestShutdownSubsubParent()
     {
     }
 
 protected:
-    NS_OVERRIDE
     virtual void
-    ActorDestroy(ActorDestroyReason why);
+    ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
 private:
     bool mExpectParentDeleted;
 };
 
 
 class TestShutdownSubParent :
     public PTestShutdownSubParent
@@ -53,42 +52,38 @@ public:
 
     virtual ~TestShutdownSubParent()
     {
         if (2 != mDeletedCount)
             fail("managees outliving manager!");
     }
 
 protected:
-    NS_OVERRIDE
     virtual bool
-    AnswerStackFrame()
+    AnswerStackFrame() MOZ_OVERRIDE
     {
         return CallStackFrame();
     }
 
-    NS_OVERRIDE
     virtual PTestShutdownSubsubParent*
-    AllocPTestShutdownSubsub(const bool& expectParentDelete)
+    AllocPTestShutdownSubsub(const bool& expectParentDelete) MOZ_OVERRIDE
     {
         return new TestShutdownSubsubParent(expectParentDelete);
     }
 
-    NS_OVERRIDE
     virtual bool
-    DeallocPTestShutdownSubsub(PTestShutdownSubsubParent* actor)
+    DeallocPTestShutdownSubsub(PTestShutdownSubsubParent* actor) MOZ_OVERRIDE
     {
         delete actor;
         ++mDeletedCount;
         return true;
     }
 
-    NS_OVERRIDE
     virtual void
-    ActorDestroy(ActorDestroyReason why);
+    ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
 private:
     bool mExpectCrash;
     int mDeletedCount;
 };
 
 
 class TestShutdownParent :
@@ -104,36 +99,33 @@ public:
 
     static bool RunTestInProcesses() { return true; }
     // FIXME/bug 703323 Could work if modified
     static bool RunTestInThreads() { return false; }
 
     void Main();
 
 protected:
-    NS_OVERRIDE virtual bool RecvSync() { return true; }
+    virtual bool RecvSync() MOZ_OVERRIDE { return true; }
 
-    NS_OVERRIDE
     virtual PTestShutdownSubParent*
-    AllocPTestShutdownSub(const bool& expectCrash)
+    AllocPTestShutdownSub(const bool& expectCrash) MOZ_OVERRIDE
     {
         return new TestShutdownSubParent(expectCrash);
     }
 
-    NS_OVERRIDE
     virtual bool
-    DeallocPTestShutdownSub(PTestShutdownSubParent* actor)
+    DeallocPTestShutdownSub(PTestShutdownSubParent* actor) MOZ_OVERRIDE
     {
         delete actor;
         return true;
     }
 
-    NS_OVERRIDE
     virtual void
-    ActorDestroy(ActorDestroyReason why);
+    ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 };
 
 
 //-----------------------------------------------------------------------------
 // Child side
 
 class TestShutdownSubsubChild :
     public PTestShutdownSubsubChild
@@ -143,19 +135,18 @@ public:
         mExpectParentDeleted(expectParentDeleted)
     {
     }
     virtual ~TestShutdownSubsubChild()
     {
     }
 
 protected:
-    NS_OVERRIDE
     virtual void
-    ActorDestroy(ActorDestroyReason why);
+    ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
 private:
     bool mExpectParentDeleted;
 };
 
 
 class TestShutdownSubChild :
     public PTestShutdownSubChild
@@ -165,37 +156,33 @@ public:
     {
     }
 
     virtual ~TestShutdownSubChild()
     {
     }
 
 protected:
-    NS_OVERRIDE
-    virtual bool AnswerStackFrame();
+    virtual bool AnswerStackFrame() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
     virtual PTestShutdownSubsubChild*
-    AllocPTestShutdownSubsub(const bool& expectParentDelete)
+    AllocPTestShutdownSubsub(const bool& expectParentDelete) MOZ_OVERRIDE
     {
         return new TestShutdownSubsubChild(expectParentDelete);
     }
 
-    NS_OVERRIDE
     virtual bool
-    DeallocPTestShutdownSubsub(PTestShutdownSubsubChild* actor)
+    DeallocPTestShutdownSubsub(PTestShutdownSubsubChild* actor) MOZ_OVERRIDE
     {
         delete actor;
         return true;
     }
 
-    NS_OVERRIDE
     virtual void
-    ActorDestroy(ActorDestroyReason why);
+    ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
 private:
     bool mExpectCrash;
 };
 
 
 class TestShutdownChild :
     public PTestShutdownChild
@@ -204,39 +191,35 @@ public:
     TestShutdownChild()
     {
     }
     virtual ~TestShutdownChild()
     {
     }
 
 protected:
-    NS_OVERRIDE
     virtual bool
     RecvStart();
 
-    NS_OVERRIDE
     virtual PTestShutdownSubChild*
     AllocPTestShutdownSub(
-        const bool& expectCrash)
+        const bool& expectCrash) MOZ_OVERRIDE
     {
         return new TestShutdownSubChild(expectCrash);
     }
 
-    NS_OVERRIDE
     virtual bool
-    DeallocPTestShutdownSub(PTestShutdownSubChild* actor)
+    DeallocPTestShutdownSub(PTestShutdownSubChild* actor) MOZ_OVERRIDE
     {
         delete actor;
         return true;
     }
 
-    NS_OVERRIDE
     virtual void
-    ActorDestroy(ActorDestroyReason why);
+    ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 };
 
 
 } // namespace _ipdltest
 } // namespace mozilla
 
 
 #endif // ifndef mozilla__ipdltest_TestShutdown_h
--- a/ipc/ipdl/test/cxx/TestStackHooks.h
+++ b/ipc/ipdl/test/cxx/TestStackHooks.h
@@ -18,64 +18,55 @@ public:
     virtual ~TestStackHooksParent();
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:    
-    NS_OVERRIDE
-    virtual bool RecvAsync() {
+    virtual bool RecvAsync() MOZ_OVERRIDE {
         if (!mOnStack)
             fail("not on C++ stack?!");
         return true;
     }
 
-    NS_OVERRIDE
-    virtual bool RecvSync() {
+    virtual bool RecvSync() MOZ_OVERRIDE {
         if (!mOnStack)
             fail("not on C++ stack?!");
         return true;
     }
 
-    NS_OVERRIDE
-    virtual bool AnswerRpc() {
+    virtual bool AnswerRpc() MOZ_OVERRIDE {
         if (!mOnStack)
             fail("not on C++ stack?!");
         return true;
     }
 
-    NS_OVERRIDE
-    virtual bool AnswerStackFrame();
+    virtual bool AnswerStackFrame() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 
-    NS_OVERRIDE
-    virtual void EnteredCxxStack() {
+    virtual void EnteredCxxStack() MOZ_OVERRIDE {
         mOnStack = true;
     }
-    NS_OVERRIDE
-    virtual void ExitedCxxStack() {
+    virtual void ExitedCxxStack() MOZ_OVERRIDE {
         mOnStack = false;
     }
 
-    NS_OVERRIDE
-    virtual void EnteredCall() {
+    virtual void EnteredCall() MOZ_OVERRIDE {
         ++mIncallDepth;
     }
-    NS_OVERRIDE
-    virtual void ExitedCall() {
+    virtual void ExitedCall() MOZ_OVERRIDE {
         --mIncallDepth;
     }
 
 private:
     bool mOnStack;
     int mIncallDepth;
 };
 
@@ -85,54 +76,47 @@ class TestStackHooksChild :
 {
 public:
     TestStackHooksChild();
     virtual ~TestStackHooksChild();
 
     void RunTests();
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvStart();
+    virtual bool RecvStart() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool AnswerStackFrame();
+    virtual bool AnswerStackFrame() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
 
         if (mEntered != mExited)
             fail("unbalanced enter/exit notifications");
 
         if (mOnStack)
             fail("computing mOnStack went awry; should have failed above assertion");
 
         QuitChild();
     }
 
-    NS_OVERRIDE
-    virtual void EnteredCxxStack() {
+    virtual void EnteredCxxStack() MOZ_OVERRIDE {
         ++mEntered;
         mOnStack = true;
     }
-    NS_OVERRIDE
-    virtual void ExitedCxxStack() {
+    virtual void ExitedCxxStack() MOZ_OVERRIDE {
         ++mExited;
         mOnStack = false;
     }
 
-    NS_OVERRIDE
-    virtual void EnteredCall() {
+    virtual void EnteredCall() MOZ_OVERRIDE {
         ++mIncallDepth;
     }
-    NS_OVERRIDE
-    virtual void ExitedCall() {
+    virtual void ExitedCall() MOZ_OVERRIDE {
         --mIncallDepth;
     }
 
 private:
     bool mOnStack;
     int mEntered;
     int mExited;
     int mIncallDepth;
--- a/ipc/ipdl/test/cxx/TestSyncError.h
+++ b/ipc/ipdl/test/cxx/TestSyncError.h
@@ -18,27 +18,24 @@ public:
     virtual ~TestSyncErrorParent();
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:    
-    NS_OVERRIDE
-    virtual bool RecvError();
+    virtual bool RecvError() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ProcessingError(Result what)
+    virtual void ProcessingError(Result what) MOZ_OVERRIDE
     {
         // Ignore errors
     }
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 };
 
@@ -46,27 +43,24 @@ protected:
 class TestSyncErrorChild :
     public PTestSyncErrorChild
 {
 public:
     TestSyncErrorChild();
     virtual ~TestSyncErrorChild();
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvStart();
+    virtual bool RecvStart() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ProcessingError(Result what)
+    virtual void ProcessingError(Result what) MOZ_OVERRIDE
     {
         // Ignore errors
     }
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 };
 
 
--- a/ipc/ipdl/test/cxx/TestSyncHang.h
+++ b/ipc/ipdl/test/cxx/TestSyncHang.h
@@ -19,18 +19,17 @@ public:
 
     static bool RunTestInProcesses() { return true; }
     // FIXME/bug 703323 Could work if modified
     static bool RunTestInThreads() { return false; }
 
     void Main();
 
 protected:    
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 };
 
@@ -38,18 +37,17 @@ protected:
 class TestSyncHangChild :
     public PTestSyncHangChild
 {
 public:
     TestSyncHangChild();
     virtual ~TestSyncHangChild();
 
 protected:
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 };
 
 
--- a/ipc/ipdl/test/cxx/TestSyncWakeup.h
+++ b/ipc/ipdl/test/cxx/TestSyncWakeup.h
@@ -18,27 +18,23 @@ public:
     virtual ~TestSyncWakeupParent();
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:
-    NS_OVERRIDE
-    virtual bool AnswerStackFrame();
+    virtual bool AnswerStackFrame() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvSync1();
+    virtual bool RecvSync1() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvSync2();
+    virtual bool RecvSync2() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 };
 
@@ -46,30 +42,25 @@ protected:
 class TestSyncWakeupChild :
     public PTestSyncWakeupChild
 {
 public:
     TestSyncWakeupChild();
     virtual ~TestSyncWakeupChild();
 
 protected:
-    NS_OVERRIDE
-    virtual bool RecvStart();
+    virtual bool RecvStart() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvNote1();
+    virtual bool RecvNote1() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool AnswerStackFrame();
+    virtual bool AnswerStackFrame() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual bool RecvNote2();
+    virtual bool RecvNote2() MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 
 private:
     bool mDone;
--- a/ipc/ipdl/test/cxx/TestSysVShmem.h
+++ b/ipc/ipdl/test/cxx/TestSysVShmem.h
@@ -18,24 +18,22 @@ public:
     virtual ~TestSysVShmemParent() { }
 
     static bool RunTestInProcesses() { return true; }
     static bool RunTestInThreads() { return true; }
 
     void Main();
 
 protected:
-    NS_OVERRIDE
     virtual bool RecvTake(
             Shmem& mem,
             Shmem& unsafe,
-            const size_t& expectedSize);
+            const size_t& expectedSize) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");  
         passed("ok");
         QuitParent();
     }
 };
 
@@ -43,24 +41,22 @@ protected:
 class TestSysVShmemChild :
     public PTestSysVShmemChild
 {
 public:
     TestSysVShmemChild() { }
     virtual ~TestSysVShmemChild() { }
 
 protected:
-    NS_OVERRIDE
     virtual bool RecvGive(
             Shmem& mem,
             Shmem& unsafe,
-            const size_t& expectedSize);
+            const size_t& expectedSize) MOZ_OVERRIDE;
 
-    NS_OVERRIDE
-    virtual void ActorDestroy(ActorDestroyReason why)
+    virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
     {
         if (NormalShutdown != why)
             fail("unexpected destruction!");
         QuitChild();
     }
 };
 
 
--- a/layout/ipc/RenderFrameChild.h
+++ b/layout/ipc/RenderFrameChild.h
@@ -17,18 +17,16 @@ class RenderFrameChild : public PRenderF
 {
 public:
   RenderFrameChild() {}
   virtual ~RenderFrameChild() {}
 
   void Destroy();
 
 protected:
-  NS_OVERRIDE
-  virtual PLayersChild* AllocPLayers();
-  NS_OVERRIDE
-  virtual bool DeallocPLayers(PLayersChild* aLayers);
+  virtual PLayersChild* AllocPLayers() MOZ_OVERRIDE;
+  virtual bool DeallocPLayers(PLayersChild* aLayers) MOZ_OVERRIDE;
 };
 
 } // namespace layout
 } // namespace mozilla
 
 #endif  // mozilla_dom_RenderFrameChild_h
--- a/layout/ipc/RenderFrameParent.h
+++ b/layout/ipc/RenderFrameParent.h
@@ -158,26 +158,24 @@ class nsDisplayRemote : public nsDisplay
 
 public:
   nsDisplayRemote(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
                   RenderFrameParent* aRemoteFrame)
     : nsDisplayItem(aBuilder, aFrame)
     , mRemoteFrame(aRemoteFrame)
   {}
 
-  NS_OVERRIDE
   virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
                                    LayerManager* aManager,
-                                   const ContainerParameters& aParameters)
+                                   const ContainerParameters& aParameters) MOZ_OVERRIDE
   { return mozilla::LAYER_ACTIVE_FORCE; }
 
-  NS_OVERRIDE
   virtual already_AddRefed<Layer>
   BuildLayer(nsDisplayListBuilder* aBuilder, LayerManager* aManager,
-             const ContainerParameters& aContainerParameters);
+             const ContainerParameters& aContainerParameters) MOZ_OVERRIDE;
 
   NS_DISPLAY_DECL_NAME("Remote", TYPE_REMOTE)
 
 private:
   RenderFrameParent* mRemoteFrame;
 };
 
 /**
@@ -197,30 +195,30 @@ public:
                         nsIFrame* aFrame,
                         nsRect aRect,
                         ViewID aId)
     : nsDisplayItem(aBuilder, aFrame)
     , mRect(aRect)
     , mId(aId)
   {}
 
-  NS_OVERRIDE nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap)
+  nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) MOZ_OVERRIDE
   {
     *aSnap = false;
     return mRect;
   }
 
   virtual PRUint32 GetPerFrameKey()
   {
     NS_ABORT();
     return 0;
   }
 
-  NS_OVERRIDE void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
-                           HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames);
+  void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
+               HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) MOZ_OVERRIDE;
 
   NS_DISPLAY_DECL_NAME("Remote-Shadow", TYPE_REMOTE_SHADOW)
 
 private:
   nsRect mRect;
   ViewID mId;
 };
 
--- a/netwerk/protocol/ftp/FTPChannelChild.h
+++ b/netwerk/protocol/ftp/FTPChannelChild.h
@@ -56,34 +56,34 @@ public:
   void ReleaseIPDLReference();
 
   NS_IMETHOD AsyncOpen(nsIStreamListener* listener, nsISupports* aContext);
 
   // Note that we handle this ourselves, overriding the nsBaseChannel
   // default behavior, in order to be e10s-friendly.
   NS_IMETHOD IsPending(bool* result);
 
-  NS_OVERRIDE nsresult OpenContentStream(bool async,
-                                         nsIInputStream** stream,
-                                         nsIChannel** channel);
+  nsresult OpenContentStream(bool async,
+                             nsIInputStream** stream,
+                             nsIChannel** channel) MOZ_OVERRIDE;
 
   bool IsSuspended();
 
 protected:
-  NS_OVERRIDE bool RecvOnStartRequest(const PRInt32& aContentLength,
-                                      const nsCString& aContentType,
-                                      const PRTime& aLastModified,
-                                      const nsCString& aEntityID,
-                                      const IPC::URI& aURI);
-  NS_OVERRIDE bool RecvOnDataAvailable(const nsCString& data,
-                                       const PRUint32& offset,
-                                       const PRUint32& count);
-  NS_OVERRIDE bool RecvOnStopRequest(const nsresult& statusCode);
-  NS_OVERRIDE bool RecvFailedAsyncOpen(const nsresult& statusCode);
-  NS_OVERRIDE bool RecvDeleteSelf();
+  bool RecvOnStartRequest(const PRInt32& aContentLength,
+                          const nsCString& aContentType,
+                          const PRTime& aLastModified,
+                          const nsCString& aEntityID,
+                          const IPC::URI& aURI) MOZ_OVERRIDE;
+  bool RecvOnDataAvailable(const nsCString& data,
+                           const PRUint32& offset,
+                           const PRUint32& count) MOZ_OVERRIDE;
+  bool RecvOnStopRequest(const nsresult& statusCode) MOZ_OVERRIDE;
+  bool RecvFailedAsyncOpen(const nsresult& statusCode) MOZ_OVERRIDE;
+  bool RecvDeleteSelf() MOZ_OVERRIDE;
 
   void DoOnStartRequest(const PRInt32& aContentLength,
                         const nsCString& aContentType,
                         const PRTime& aLastModified,
                         const nsCString& aEntityID,
                         const IPC::URI& aURI);
   void DoOnDataAvailable(const nsCString& data,
                          const PRUint32& offset,
--- a/netwerk/protocol/ftp/FTPChannelParent.h
+++ b/netwerk/protocol/ftp/FTPChannelParent.h
@@ -31,32 +31,32 @@ public:
   NS_DECL_NSIPARENTCHANNEL
   NS_DECL_NSIINTERFACEREQUESTOR
   NS_DECL_NSILOADCONTEXT
 
   FTPChannelParent();
   virtual ~FTPChannelParent();
 
 protected:
-  NS_OVERRIDE virtual bool RecvAsyncOpen(const IPC::URI& uri,
-                                         const PRUint64& startPos,
-                                         const nsCString& entityID,
-                                         const IPC::InputStream& uploadStream,
-                                         const bool& haveLoadContext,
-                                         const bool& isContent,
-                                         const bool& usingPrivateBrowsing,
-                                         const bool& isInBrowserElement,
-                                         const PRUint32& appId,
-                                         const nsCString& extendedOrigin);
-  NS_OVERRIDE virtual bool RecvConnectChannel(const PRUint32& channelId);
-  NS_OVERRIDE virtual bool RecvCancel(const nsresult& status);
-  NS_OVERRIDE virtual bool RecvSuspend();
-  NS_OVERRIDE virtual bool RecvResume();
+  virtual bool RecvAsyncOpen(const IPC::URI& uri,
+                             const PRUint64& startPos,
+                             const nsCString& entityID,
+                             const IPC::InputStream& uploadStream,
+                             const bool& haveLoadContext,
+                             const bool& isContent,
+                             const bool& usingPrivateBrowsing,
+                             const bool& isInBrowserElement,
+                             const PRUint32& appId,
+                             const nsCString& extendedOrigin) MOZ_OVERRIDE;
+  virtual bool RecvConnectChannel(const PRUint32& channelId) MOZ_OVERRIDE;
+  virtual bool RecvCancel(const nsresult& status) MOZ_OVERRIDE;
+  virtual bool RecvSuspend() MOZ_OVERRIDE;
+  virtual bool RecvResume() MOZ_OVERRIDE;
 
-  NS_OVERRIDE virtual void ActorDestroy(ActorDestroyReason why);
+  virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
   nsRefPtr<nsFtpChannel> mChannel;
 
   bool mIPCClosed;
 
   // fields for impersonating nsILoadContext
   bool mHaveLoadContext       : 1;
   bool mIsContent             : 1;
--- a/xpcom/base/nscore.h
+++ b/xpcom/base/nscore.h
@@ -445,23 +445,21 @@ typedef PRUint32 nsrefcnt;
 /**
  * Attributes defined to help Dehydra GCC analysis.
  */
 #ifdef NS_STATIC_CHECKING
 # define NS_SCRIPTABLE __attribute__((user("NS_script")))
 # define NS_INPARAM __attribute__((user("NS_inparam")))
 # define NS_OUTPARAM  __attribute__((user("NS_outparam")))
 # define NS_INOUTPARAM __attribute__((user("NS_inoutparam")))
-# define NS_OVERRIDE __attribute__((user("NS_override")))
 #else
 # define NS_SCRIPTABLE
 # define NS_INPARAM
 # define NS_OUTPARAM
 # define NS_INOUTPARAM
-# define NS_OVERRIDE
 #endif
 
 /*
  * SEH exception macros.
  */
 #ifdef HAVE_SEH_EXCEPTIONS
 #define MOZ_SEH_TRY           __try
 #define MOZ_SEH_EXCEPT(expr)  __except(expr)
--- a/xpcom/components/nsNativeComponentLoader.h
+++ b/xpcom/components/nsNativeComponentLoader.h
@@ -16,17 +16,17 @@
 class nsNativeModuleLoader : public mozilla::ModuleLoader
 {
  public:
     NS_DECL_ISUPPORTS_INHERITED
 
     nsNativeModuleLoader() {}
     ~nsNativeModuleLoader() {}
 
-    NS_OVERRIDE virtual const mozilla::Module* LoadModule(mozilla::FileLocation &aFile);
+    virtual const mozilla::Module* LoadModule(mozilla::FileLocation &aFile) MOZ_OVERRIDE;
 
     nsresult Init();
 
     void UnloadLibraries();
 
  private:
     struct NativeLoadData
     {
deleted file mode 100644
--- a/xpcom/tests/static-checker/override-global.cpp
+++ /dev/null
@@ -1,1 +0,0 @@
-__attribute__((user("NS_override"))) int m();
deleted file mode 100644
--- a/xpcom/tests/static-checker/override-namespace-typedef.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "nscore.h"
-
-namespace A {
-namespace B {
-namespace C {
-  struct Param {};
-
-  class Base {
-    virtual void f(const Param& p) {}
-  };
-}}}
-
-class Derived : public A::B::C::Base {
-  typedef A::B::C::Param P;
-  NS_OVERRIDE void f(const P& p) {}
-};
deleted file mode 100644
--- a/xpcom/tests/static-checker/override-pass.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-class A
-{
-  int a(int, char*);
-  void c(char);
-  virtual void d(int) = 0;
-};
-
-class B : A
-{
-  __attribute__((user("NS_override"))) int a(int, char*);
-};
-
-class C : B
-{
-  __attribute__((user("NS_override"))) void c(char);
-};
-
-class D : A
-{
-  __attribute__((user("NS_override"))) void d(int);
-};
deleted file mode 100644
--- a/xpcom/tests/static-checker/override-signature.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-class A
-{
-  int m(int);
-};
-
-class B : A
-{
-  __attribute__((user("NS_override"))) int m(void*);
-};
deleted file mode 100644
--- a/xpcom/tests/static-checker/override-static.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-class A
-{
-  static int m();
-};
-
-class B : A
-{
-  __attribute__((user("NS_override"))) static int m();
-};
deleted file mode 100644
--- a/xpcom/tests/static-checker/override-virtual.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-class A
-{
-  int m();
-};
-
-class B : A
-{
-  __attribute__((user("NS_override"))) virtual int m();
-};