Bug 1293117 (part 4) - Change many NS_IMETHODIMP occurrences to NS_IMETHOD. r=froydnj.
authorNicholas Nethercote <nnethercote@mozilla.com>
Mon, 08 Aug 2016 10:54:47 +1000
changeset 309106 babe907f527681f351d62d689230d23e55d6a729
parent 309105 4db4249540773fabd59acb0e3fe883c95d3213f4
child 309107 2605dceca7b26e11f3a2c546cf5aaea7d0fb9385
push id30557
push userkwierso@gmail.com
push dateFri, 12 Aug 2016 20:45:15 +0000
treeherdermozilla-central@ef3a50774180 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1293117
milestone51.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 1293117 (part 4) - Change many NS_IMETHODIMP occurrences to NS_IMETHOD. r=froydnj. This patch makes the following changes on many in-class methods. - NS_IMETHODIMP F() override; --> NS_IMETHOD F() override; - NS_IMETHODIMP F() override {...} --> NS_IMETHOD F() override {...} - NS_IMETHODIMP F() final; --> NS_IMETHOD F() final; - NS_IMETHODIMP F() final {...} --> NS_IMETHOD F() final {...} Using NS_IMETHOD is the preferred way of marking in-class virtual methods. Although these transformations add an explicit |virtual|, they are safe -- there's an implicit |virtual| anyway because |override| and |final| only work with virtual methods.
accessible/base/nsAccessibilityService.cpp
caps/nsPrincipal.h
docshell/base/nsDocShell.cpp
dom/base/ImageEncoder.cpp
dom/base/nsFrameLoader.cpp
dom/base/nsFrameMessageManager.h
dom/base/nsGlobalWindow.cpp
dom/broadcastchannel/BroadcastChannel.cpp
dom/browser-element/BrowserElementAudioChannel.cpp
dom/camera/DOMCameraCapabilities.cpp
dom/camera/GonkCameraControl.cpp
dom/canvas/CanvasImageCache.cpp
dom/crypto/WebCryptoThreadPool.h
dom/devicestorage/nsDeviceStorage.cpp
dom/html/nsGenericHTMLElement.h
dom/ipc/TabParent.cpp
dom/media/MediaRecorder.cpp
dom/media/webaudio/AudioBufferSourceNode.cpp
dom/media/webaudio/AudioNode.cpp
dom/notification/DesktopNotification.h
dom/plugins/base/nsPluginStreamListenerPeer.cpp
dom/storage/DOMStorageCache.cpp
dom/svg/SVGFEImageElement.h
dom/system/gonk/mozstumbler/WriteStumbleOnThread.cpp
dom/system/gonk/mozstumbler/WriteStumbleOnThread.h
dom/workers/ServiceWorkerManager.cpp
dom/workers/ServiceWorkerManagerService.cpp
dom/workers/ServiceWorkerRegistration.cpp
dom/workers/ServiceWorkerUnregisterJob.cpp
dom/workers/WorkerScope.cpp
dom/xslt/xpath/txXPathObjectAdaptor.h
extensions/cookie/nsPermissionManager.cpp
gfx/layers/LayerScope.cpp
gfx/layers/apz/util/APZEventState.cpp
gfx/layers/apz/util/APZThreadUtils.h
intl/unicharutil/nsSaveAsCharset.h
ipc/hal/DaemonRunnables.h
layout/base/nsPresShell.cpp
layout/forms/nsComboboxControlFrame.cpp
layout/forms/nsNumberControlFrame.cpp
media/webrtc/signaling/src/media-conduit/WebrtcMediaCodecVP8VideoCodec.cpp
media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp
media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp
media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h
netwerk/base/ProxyAutoConfig.cpp
netwerk/base/nsFileStreams.h
netwerk/base/nsIOService.h
netwerk/cache/nsApplicationCacheService.cpp
netwerk/cookie/nsCookieService.cpp
netwerk/dns/mdns/libmdns/MDNSResponderReply.h
netwerk/protocol/file/nsFileChannel.cpp
netwerk/protocol/ftp/nsFTPChannel.h
netwerk/protocol/http/Http2Compression.cpp
netwerk/protocol/http/HttpBaseChannel.cpp
netwerk/protocol/http/TunnelUtils.cpp
netwerk/sctp/datachannel/DataChannel.cpp
parser/html/nsHtml5Module.cpp
parser/html/nsHtml5Parser.h
parser/htmlparser/nsParser.h
storage/mozStorageAsyncStatement.cpp
storage/mozStorageStatement.cpp
toolkit/components/downloads/nsDownloadProxy.h
toolkit/components/filewatcher/NativeFileWatcherNotSupported.h
tools/profiler/gecko/ThreadResponsiveness.cpp
widget/cocoa/nsPrintDialogX.h
widget/gtk/nsFilePicker.h
widget/gtk/nsPrintDialogGTK.h
widget/nsFilePickerProxy.h
widget/windows/nsAppShell.cpp
xpcom/base/CountingAllocatorBase.h
xpcom/base/nsMemoryInfoDumper.cpp
xpcom/build/XPCOMInit.cpp
xpcom/tests/TestHarness.h
--- a/accessible/base/nsAccessibilityService.cpp
+++ b/accessible/base/nsAccessibilityService.cpp
@@ -405,17 +405,17 @@ class PluginTimerCallBack final : public
 {
   ~PluginTimerCallBack() {}
 
 public:
   PluginTimerCallBack(nsIContent* aContent) : mContent(aContent) {}
 
   NS_DECL_ISUPPORTS
 
-  NS_IMETHODIMP Notify(nsITimer* aTimer) final
+  NS_IMETHOD Notify(nsITimer* aTimer) final
   {
     if (!mContent->IsInUncomposedDoc())
       return NS_OK;
 
     nsIPresShell* ps = mContent->OwnerDoc()->GetShell();
     if (ps) {
       DocAccessible* doc = ps->GetDocAccessible();
       if (doc) {
--- a/caps/nsPrincipal.h
+++ b/caps/nsPrincipal.h
@@ -66,18 +66,18 @@ protected:
 
 class nsExpandedPrincipal : public nsIExpandedPrincipal, public mozilla::BasePrincipal
 {
 public:
   explicit nsExpandedPrincipal(nsTArray< nsCOMPtr<nsIPrincipal> > &aWhiteList);
 
   NS_DECL_NSIEXPANDEDPRINCIPAL
   NS_DECL_NSISERIALIZABLE
-  NS_IMETHODIMP_(MozExternalRefCountType) AddRef() override { return nsJSPrincipals::AddRef(); };
-  NS_IMETHODIMP_(MozExternalRefCountType) Release() override { return nsJSPrincipals::Release(); };
+  NS_IMETHOD_(MozExternalRefCountType) AddRef() override { return nsJSPrincipals::AddRef(); };
+  NS_IMETHOD_(MozExternalRefCountType) Release() override { return nsJSPrincipals::Release(); };
   NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) override;
   NS_IMETHOD GetHashValue(uint32_t* aHashValue) override;
   NS_IMETHOD GetURI(nsIURI** aURI) override;
   NS_IMETHOD GetDomain(nsIURI** aDomain) override;
   NS_IMETHOD SetDomain(nsIURI* aDomain) override;
   NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain) override;
   virtual bool IsOnCSSUnprefixingWhitelist() override;
   virtual void GetScriptLocation(nsACString &aStr) override;
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -9498,17 +9498,17 @@ public:
                         bool aInPrivateBrowsing)
     : mSvc(aSvc)
     , mNewURI(aNewURI)
     , mLoadingPrincipal(aLoadingPrincipal)
     , mInPrivateBrowsing(aInPrivateBrowsing)
   {
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   OnComplete(nsIURI* aFaviconURI, uint32_t aDataLen,
              const uint8_t* aData, const nsACString& aMimeType) override
   {
     // Continue only if there is an associated favicon.
     if (!aFaviconURI) {
       return NS_OK;
     }
 
--- a/dom/base/ImageEncoder.cpp
+++ b/dom/base/ImageEncoder.cpp
@@ -491,17 +491,17 @@ ImageEncoder::GetImageEncoder(nsAString&
   return encoder.forget();
 }
 
 class EncoderThreadPoolTerminator final : public nsIObserver
 {
   public:
     NS_DECL_ISUPPORTS
 
-    NS_IMETHODIMP Observe(nsISupports *, const char *topic, const char16_t *) override
+    NS_IMETHOD Observe(nsISupports *, const char *topic, const char16_t *) override
     {
       NS_ASSERTION(!strcmp(topic, "xpcom-shutdown-threads"),
                    "Unexpected topic");
       if (ImageEncoder::sThreadPool) {
         ImageEncoder::sThreadPool->Shutdown();
         ImageEncoder::sThreadPool = nullptr;
       }
       return NS_OK;
--- a/dom/base/nsFrameLoader.cpp
+++ b/dom/base/nsFrameLoader.cpp
@@ -1530,17 +1530,17 @@ class nsFrameLoaderDestroyRunnable : pub
 
   RefPtr<nsFrameLoader> mFrameLoader;
   DestroyPhase mPhase;
 
 public:
   explicit nsFrameLoaderDestroyRunnable(nsFrameLoader* aFrameLoader)
    : mFrameLoader(aFrameLoader), mPhase(eDestroyDocShell) {}
 
-  NS_IMETHODIMP Run() override;
+  NS_IMETHOD Run() override;
 };
 
 void
 nsFrameLoader::StartDestroy()
 {
   // nsFrameLoader::StartDestroy is called just before the frameloader is
   // detached from the <browser> element. Destruction continues in phases via
   // the nsFrameLoaderDestroyRunnable.
--- a/dom/base/nsFrameMessageManager.h
+++ b/dom/base/nsFrameMessageManager.h
@@ -420,19 +420,19 @@ class nsScriptCacheCleaner final : publi
   {
     nsCOMPtr<nsIObserverService> obsSvc = mozilla::services::GetObserverService();
     if (obsSvc) {
       obsSvc->AddObserver(this, "message-manager-flush-caches", false);
       obsSvc->AddObserver(this, "xpcom-shutdown", false);
     }
   }
 
-  NS_IMETHODIMP Observe(nsISupports *aSubject,
-                        const char *aTopic,
-                        const char16_t *aData) override
+  NS_IMETHOD Observe(nsISupports *aSubject,
+                     const char *aTopic,
+                     const char16_t *aData) override
   {
     if (strcmp("message-manager-flush-caches", aTopic) == 0) {
       nsMessageManagerScriptExecutor::PurgeCache();
     } else if (strcmp("xpcom-shutdown", aTopic) == 0) {
       nsMessageManagerScriptExecutor::Shutdown();
     }
     return NS_OK;
   }
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -475,17 +475,17 @@ public:
   NS_DECL_ISUPPORTS
   NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic, const char16_t* aData) override
   {
     if (!mWindow)
       return NS_OK;
     return mWindow->Observe(aSubject, aTopic, aData);
   }
   void Forget() { mWindow = nullptr; }
-  NS_IMETHODIMP GetInterface(const nsIID& aIID, void** aResult) override
+  NS_IMETHOD GetInterface(const nsIID& aIID, void** aResult) override
   {
     if (mWindow && aIID.Equals(NS_GET_IID(nsIDOMWindow)) && mWindow) {
       return mWindow->QueryInterface(aIID, aResult);
     }
     return NS_NOINTERFACE;
   }
 
 private:
--- a/dom/broadcastchannel/BroadcastChannel.cpp
+++ b/dom/broadcastchannel/BroadcastChannel.cpp
@@ -144,17 +144,17 @@ public:
   BCPostMessageRunnable(BroadcastChannelChild* aActor,
                         BroadcastChannelMessage* aData)
     : mActor(aActor)
     , mData(aData)
   {
     MOZ_ASSERT(mActor);
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     MOZ_ASSERT(mActor);
     if (mActor->IsActorDestroyed()) {
       return NS_OK;
     }
 
     ClonedMessageData message;
 
@@ -206,17 +206,17 @@ public:
   NS_DECL_ISUPPORTS
 
   explicit CloseRunnable(BroadcastChannel* aBC)
     : mBC(aBC)
   {
     MOZ_ASSERT(mBC);
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     mBC->Shutdown();
     return NS_OK;
   }
 
   nsresult Cancel() override
   {
     mBC = nullptr;
@@ -238,17 +238,17 @@ public:
   NS_DECL_ISUPPORTS
 
   explicit TeardownRunnable(BroadcastChannelChild* aActor)
     : mActor(aActor)
   {
     MOZ_ASSERT(mActor);
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     MOZ_ASSERT(mActor);
     if (!mActor->IsActorDestroyed()) {
       mActor->SendClose();
     }
     return NS_OK;
   }
 
--- a/dom/browser-element/BrowserElementAudioChannel.cpp
+++ b/dom/browser-element/BrowserElementAudioChannel.cpp
@@ -176,17 +176,17 @@ public:
 	       nsPIDOMWindowOuter* aFrameWindow,
                DOMRequest* aRequest, AudioChannel aAudioChannel)
     : mParentWindow(aParentWindow)
     , mFrameWindow(aFrameWindow)
     , mRequest(aRequest)
     , mAudioChannel(aAudioChannel)
   {}
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     RefPtr<AudioChannelService> service = AudioChannelService::GetOrCreate();
     if (!service) {
       return NS_OK;
     }
 
     AutoJSAPI jsapi;
     if (!jsapi.Init(mParentWindow)) {
--- a/dom/camera/DOMCameraCapabilities.cpp
+++ b/dom/camera/DOMCameraCapabilities.cpp
@@ -26,17 +26,17 @@ class CameraClosedMessage : public Runna
 {
 public:
   explicit CameraClosedMessage(nsMainThreadPtrHandle<T> aListener)
     : mListener(aListener)
   {
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   Run() override
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     RefPtr<T> listener = mListener.get();
     if (listener) {
       listener->OnHardwareClosed();
     }
--- a/dom/camera/GonkCameraControl.cpp
+++ b/dom/camera/GonkCameraControl.cpp
@@ -973,17 +973,17 @@ nsGonkCameraControl::SetThumbnailSize(co
     SetThumbnailSize(nsGonkCameraControl* aCameraControl, const Size& aSize)
       : mCameraControl(aCameraControl)
       , mSize(aSize)
     {
       MOZ_COUNT_CTOR(SetThumbnailSize);
     }
     ~SetThumbnailSize() { MOZ_COUNT_DTOR(SetThumbnailSize); }
 
-    NS_IMETHODIMP
+    NS_IMETHOD
     Run() override
     {
       nsresult rv = mCameraControl->SetThumbnailSizeImpl(mSize);
       if (NS_FAILED(rv)) {
         mCameraControl->OnUserError(CameraControlListener::kInSetThumbnailSize, rv);
       }
       return NS_OK;
     }
@@ -1091,17 +1091,17 @@ nsGonkCameraControl::SetPictureSize(cons
     SetPictureSize(nsGonkCameraControl* aCameraControl, const Size& aSize)
       : mCameraControl(aCameraControl)
       , mSize(aSize)
     {
       MOZ_COUNT_CTOR(SetPictureSize);
     }
     ~SetPictureSize() { MOZ_COUNT_DTOR(SetPictureSize); }
 
-    NS_IMETHODIMP
+    NS_IMETHOD
     Run() override
     {
       nsresult rv = mCameraControl->SetPictureSizeImpl(mSize);
       if (NS_FAILED(rv)) {
         mCameraControl->OnUserError(CameraControlListener::kInSetPictureSize, rv);
       }
       return NS_OK;
     }
@@ -1475,17 +1475,17 @@ nsGonkCameraControl::OnAutoFocusComplete
   {
   public:
     AutoFocusComplete(nsGonkCameraControl* aCameraControl, bool aSuccess, bool aExpired)
       : mCameraControl(aCameraControl)
       , mSuccess(aSuccess)
       , mExpired(aExpired)
     { }
 
-    NS_IMETHODIMP
+    NS_IMETHOD
     Run() override
     {
       mCameraControl->OnAutoFocusComplete(mSuccess, mExpired);
       return NS_OK;
     }
 
   protected:
     RefPtr<nsGonkCameraControl> mCameraControl;
@@ -2259,17 +2259,17 @@ nsGonkCameraControl::CreatePoster(Image*
       , mDstLength(0)
     { }
 
     virtual ~PosterRunnable()
     {
       mTarget->OnPoster(mDst, mDstLength);
     }
 
-    NS_IMETHODIMP Run() override
+    NS_IMETHOD Run() override
     {
 #ifdef MOZ_WIDGET_GONK
       // NV21 (yuv420sp) is 12 bits / pixel
       size_t srcLength = (mWidth * mHeight * 3 + 1) / 2;
 
       // ARGB is 32 bits / pixel
       size_t tmpLength = mWidth * mHeight * sizeof(uint32_t);
       UniquePtr<uint8_t[]> tmp = MakeUnique<uint8_t[]>(tmpLength);
--- a/dom/canvas/CanvasImageCache.cpp
+++ b/dom/canvas/CanvasImageCache.cpp
@@ -199,19 +199,19 @@ public:
   }
 
   void Destroy()
   {
     UnregisterMemoryPressureEvent();
     mImageCache = nullptr;
   }
 
-  NS_IMETHODIMP Observe(nsISupports* aSubject,
-                        const char* aTopic,
-                        const char16_t* aSomeData) override
+  NS_IMETHOD Observe(nsISupports* aSubject,
+                     const char* aTopic,
+                     const char16_t* aSomeData) override
   {
     if (!mImageCache || strcmp(aTopic, "memory-pressure")) {
       return NS_OK;
     }
 
     mImageCache->AgeAllGenerations();
     return NS_OK;
   }
--- a/dom/crypto/WebCryptoThreadPool.h
+++ b/dom/crypto/WebCryptoThreadPool.h
@@ -35,19 +35,19 @@ private:
   Init();
 
   nsresult
   DispatchInternal(nsIRunnable* aRunnable);
 
   void
   Shutdown();
 
-  NS_IMETHODIMP Observe(nsISupports* aSubject,
-                        const char* aTopic,
-                        const char16_t* aData) override;
+  NS_IMETHOD Observe(nsISupports* aSubject,
+                     const char* aTopic,
+                     const char16_t* aData) override;
 
   mozilla::Mutex mMutex;
   nsCOMPtr<nsIThreadPool> mPool;
 };
 
 } // namespace dom
 } // namespace mozilla
 
--- a/dom/devicestorage/nsDeviceStorage.cpp
+++ b/dom/devicestorage/nsDeviceStorage.cpp
@@ -2481,17 +2481,17 @@ public:
   }
 
   NS_IMETHOD Allow(JS::HandleValue aChoices) override
   {
     MOZ_ASSERT(aChoices.isUndefined());
     return Resolve(true);
   }
 
-  NS_IMETHODIMP GetTypes(nsIArray** aTypes) override
+  NS_IMETHOD GetTypes(nsIArray** aTypes) override
   {
     nsString storageType;
     mRequest->GetStorageType(storageType);
     nsCString type;
     nsresult rv =
       DeviceStorageTypeChecker::GetPermissionForType(storageType, type);
     if (NS_WARN_IF(NS_FAILED(rv))) {
       return rv;
--- a/dom/html/nsGenericHTMLElement.h
+++ b/dom/html/nsGenericHTMLElement.h
@@ -68,26 +68,26 @@ public:
 
   // From Element
   nsresult CopyInnerTo(mozilla::dom::Element* aDest);
 
   void GetTitle(mozilla::dom::DOMString& aTitle)
   {
     GetHTMLAttr(nsGkAtoms::title, aTitle);
   }
-  NS_IMETHODIMP SetTitle(const nsAString& aTitle) override
+  NS_IMETHOD SetTitle(const nsAString& aTitle) override
   {
     SetHTMLAttr(nsGkAtoms::title, aTitle);
     return NS_OK;
   }
   void GetLang(mozilla::dom::DOMString& aLang)
   {
     GetHTMLAttr(nsGkAtoms::lang, aLang);
   }
-  NS_IMETHODIMP SetLang(const nsAString& aLang) override
+  NS_IMETHOD SetLang(const nsAString& aLang) override
   {
     SetHTMLAttr(nsGkAtoms::lang, aLang);
     return NS_OK;
   }
   void GetDir(mozilla::dom::DOMString& aDir)
   {
     GetHTMLEnumAttr(nsGkAtoms::dir, aDir);
   }
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -1414,19 +1414,19 @@ class SynthesizedEventObserver : public 
 public:
   SynthesizedEventObserver(TabParent* aTabParent, const uint64_t& aObserverId)
     : mTabParent(aTabParent)
     , mObserverId(aObserverId)
   {
     MOZ_ASSERT(mTabParent);
   }
 
-  NS_IMETHODIMP Observe(nsISupports* aSubject,
-                        const char* aTopic,
-                        const char16_t* aData) override
+  NS_IMETHOD Observe(nsISupports* aSubject,
+                     const char* aTopic,
+                     const char16_t* aData) override
   {
     if (!mTabParent) {
       // We already sent the notification
       return NS_OK;
     }
 
     if (!mTabParent->SendNativeSynthesisResponse(mObserverId, nsCString(aTopic))) {
       NS_WARNING("Unable to send native event synthesization response!");
--- a/dom/media/MediaRecorder.cpp
+++ b/dom/media/MediaRecorder.cpp
@@ -893,17 +893,17 @@ private:
     }
 
     for (RefPtr<MediaStreamTrack>& track : mMediaStreamTracks) {
       track->RemovePrincipalChangeObserver(this);
     }
     mMediaStreamTracks.Clear();
   }
 
-  NS_IMETHODIMP Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData) override
+  NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData) override
   {
     MOZ_ASSERT(NS_IsMainThread());
     LOG(LogLevel::Debug, ("Session.Observe XPCOM_SHUTDOWN %p", this));
     if (strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID) == 0) {
       // Force stop Session to terminate Read Thread.
       mEncoder->Cancel();
       if (mReadThread) {
         mReadThread->Shutdown();
--- a/dom/media/webaudio/AudioBufferSourceNode.cpp
+++ b/dom/media/webaudio/AudioBufferSourceNode.cpp
@@ -776,17 +776,17 @@ AudioBufferSourceNode::NotifyMainThreadS
 {
   MOZ_ASSERT(mStream->IsFinished());
 
   class EndedEventDispatcher final : public Runnable
   {
   public:
     explicit EndedEventDispatcher(AudioBufferSourceNode* aNode)
       : mNode(aNode) {}
-    NS_IMETHODIMP Run() override
+    NS_IMETHOD Run() override
     {
       // If it's not safe to run scripts right now, schedule this to run later
       if (!nsContentUtils::IsSafeToRunScript()) {
         nsContentUtils::AddScriptRunner(this);
         return NS_OK;
       }
 
       mNode->DispatchTrustedEvent(NS_LITERAL_STRING("ended"));
--- a/dom/media/webaudio/AudioNode.cpp
+++ b/dom/media/webaudio/AudioNode.cpp
@@ -303,17 +303,17 @@ AudioNode::DisconnectFromOutputIfConnect
   // releasing nodes, to give engines receiving sound now time to keep their
   // nodes alive.
   class RunnableRelease final : public Runnable
   {
   public:
     explicit RunnableRelease(already_AddRefed<AudioNode> aNode)
       : mNode(aNode) {}
 
-    NS_IMETHODIMP Run() override
+    NS_IMETHOD Run() override
     {
       mNode = nullptr;
       return NS_OK;
     }
   private:
     RefPtr<AudioNode> mNode;
   };
 
--- a/dom/notification/DesktopNotification.h
+++ b/dom/notification/DesktopNotification.h
@@ -146,17 +146,17 @@ class AlertServiceObserver: public nsIOb
  public:
   NS_DECL_ISUPPORTS
 
   explicit AlertServiceObserver(DesktopNotification* notification)
     : mNotification(notification) {}
 
   void Disconnect() { mNotification = nullptr; }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   Observe(nsISupports* aSubject,
           const char* aTopic,
           const char16_t* aData) override
   {
 
     // forward to parent
     if (mNotification) {
 #ifdef MOZ_B2G
--- a/dom/plugins/base/nsPluginStreamListenerPeer.cpp
+++ b/dom/plugins/base/nsPluginStreamListenerPeer.cpp
@@ -1339,17 +1339,17 @@ public:
     , mNewChannel(newChannel)
   {
   }
 
   ChannelRedirectProxyCallback() {}
 
   NS_DECL_ISUPPORTS
 
-  NS_IMETHODIMP OnRedirectVerifyCallback(nsresult aResult) override
+  NS_IMETHOD OnRedirectVerifyCallback(nsresult aResult) override
   {
     if (NS_SUCCEEDED(aResult)) {
       nsCOMPtr<nsIStreamListener> listener = do_QueryReferent(mWeakListener);
       if (listener)
         static_cast<nsPluginStreamListenerPeer*>(listener.get())->ReplaceRequest(mOldChannel, mNewChannel);
     }
     return mParent->OnRedirectVerifyCallback(aResult);
   }
--- a/dom/storage/DOMStorageCache.cpp
+++ b/dom/storage/DOMStorageCache.cpp
@@ -249,17 +249,17 @@ namespace {
 // This class is passed to timer as a tick observer.  It refers the cache
 // and keeps it alive for a time.
 class DOMStorageCacheHolder : public nsITimerCallback
 {
   virtual ~DOMStorageCacheHolder() {}
 
   NS_DECL_ISUPPORTS
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   Notify(nsITimer* aTimer) override
   {
     mCache = nullptr;
     return NS_OK;
   }
 
   RefPtr<DOMStorageCache> mCache;
 
--- a/dom/svg/SVGFEImageElement.h
+++ b/dom/svg/SVGFEImageElement.h
@@ -57,17 +57,17 @@ public:
   virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
                                 const nsAttrValue* aValue, bool aNotify) override;
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent,
                               bool aCompileEventHandlers) override;
   virtual void UnbindFromTree(bool aDeep, bool aNullParent) override;
   virtual EventStates IntrinsicState() const override;
 
-  NS_IMETHODIMP Notify(imgIRequest *aRequest, int32_t aType, const nsIntRect* aData) override;
+  NS_IMETHOD Notify(imgIRequest *aRequest, int32_t aType, const nsIntRect* aData) override;
 
   void MaybeLoadSVGImage();
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> Href();
   already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
 
 private:
--- a/dom/system/gonk/mozstumbler/WriteStumbleOnThread.cpp
+++ b/dom/system/gonk/mozstumbler/WriteStumbleOnThread.cpp
@@ -25,17 +25,17 @@ WriteStumbleOnThread::UploadFreqGuard Wr
 #define FILENAME_COMPLETED NS_LITERAL_CSTRING("stumbles.done.json.gz")
 #define OUTPUT_DIR NS_LITERAL_CSTRING("mozstumbler")
 
 class DeleteRunnable : public Runnable
 {
   public:
     DeleteRunnable() {}
 
-    NS_IMETHODIMP
+    NS_IMETHOD
     Run() override
     {
       nsCOMPtr<nsIFile> tmpFile;
       nsresult rv = nsDumpUtils::OpenTempFile(FILENAME_COMPLETED,
                                               getter_AddRefs(tmpFile),
                                               OUTPUT_DIR,
                                               nsDumpUtils::CREATE);
       if (NS_SUCCEEDED(rv)) {
--- a/dom/system/gonk/mozstumbler/WriteStumbleOnThread.h
+++ b/dom/system/gonk/mozstumbler/WriteStumbleOnThread.h
@@ -37,17 +37,17 @@ class DeleteRunnable;
  */
 class WriteStumbleOnThread : public mozilla::Runnable
 {
 public:
   explicit WriteStumbleOnThread(const nsCString& aDesc)
   : mDesc(aDesc)
   {}
 
-  NS_IMETHODIMP Run() override;
+  NS_IMETHOD Run() override;
 
   static void UploadEnded(bool deleteUploadFile);
 
   // Used externally to determine if cell+wifi scans should happen
   // (returns false for that case).
   static bool IsFileWaitingForUpload();
 
 private:
--- a/dom/workers/ServiceWorkerManager.cpp
+++ b/dom/workers/ServiceWorkerManager.cpp
@@ -196,17 +196,17 @@ class TeardownRunnable final : public Ru
 {
 public:
   explicit TeardownRunnable(ServiceWorkerManagerChild* aActor)
     : mActor(aActor)
   {
     MOZ_ASSERT(mActor);
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     MOZ_ASSERT(mActor);
     mActor->SendShutdown();
     return NS_OK;
   }
 
 private:
   ~TeardownRunnable() {}
--- a/dom/workers/ServiceWorkerManagerService.cpp
+++ b/dom/workers/ServiceWorkerManagerService.cpp
@@ -49,17 +49,17 @@ public:
   {
     AssertIsInMainProcess();
     AssertIsOnBackgroundThread();
 
     MOZ_ASSERT(mData && !aData);
     MOZ_ASSERT(mBackgroundThread);
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   Run() override
   {
     if (NS_IsMainThread()) {
       for (uint32_t i = 0; i < mData->Length(); ++i) {
         NotifySoftUpdateData& data = mData->ElementAt(i);
         nsTArray<TabContext> contextArray =
           data.mContentParent->GetManagedTabContext();
         // mContentParent needs to be released in the main thread.
--- a/dom/workers/ServiceWorkerRegistration.cpp
+++ b/dom/workers/ServiceWorkerRegistration.cpp
@@ -524,25 +524,25 @@ public:
   NS_DECL_ISUPPORTS
 
   explicit UnregisterCallback(Promise* aPromise)
     : mPromise(aPromise)
   {
     MOZ_ASSERT(mPromise);
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   UnregisterSucceeded(bool aState) override
   {
     AssertIsOnMainThread();
     mPromise->MaybeResolve(aState);
     return NS_OK;
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   UnregisterFailed() override
   {
     AssertIsOnMainThread();
 
     mPromise->MaybeReject(NS_ERROR_DOM_SECURITY_ERR);
     return NS_OK;
   }
 
@@ -590,25 +590,25 @@ public:
   NS_DECL_ISUPPORTS
 
   explicit WorkerUnregisterCallback(PromiseWorkerProxy* aProxy)
     : mPromiseWorkerProxy(aProxy)
   {
     MOZ_ASSERT(aProxy);
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   UnregisterSucceeded(bool aState) override
   {
     AssertIsOnMainThread();
     Finish(Some(aState));
     return NS_OK;
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   UnregisterFailed() override
   {
     AssertIsOnMainThread();
     Finish(Nothing());
     return NS_OK;
   }
 
 private:
--- a/dom/workers/ServiceWorkerUnregisterJob.cpp
+++ b/dom/workers/ServiceWorkerUnregisterJob.cpp
@@ -19,17 +19,17 @@ public:
   NS_DECL_ISUPPORTS
 
   explicit PushUnsubscribeCallback(ServiceWorkerUnregisterJob* aJob)
     : mJob(aJob)
   {
     AssertIsOnMainThread();
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   OnUnsubscribe(nsresult aStatus, bool) override
   {
     // Warn if unsubscribing fails, but don't prevent the worker from
     // unregistering.
     Unused << NS_WARN_IF(NS_FAILED(aStatus));
     mJob->Unregister();
     return NS_OK;
   }
--- a/dom/workers/WorkerScope.cpp
+++ b/dom/workers/WorkerScope.cpp
@@ -616,17 +616,17 @@ public:
   WorkerScopeSkipWaitingRunnable(PromiseWorkerProxy* aPromiseProxy,
                                  const nsCString& aScope)
     : mPromiseProxy(aPromiseProxy)
     , mScope(aScope)
   {
     MOZ_ASSERT(aPromiseProxy);
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   Run() override
   {
     AssertIsOnMainThread();
     RefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
     MOZ_ASSERT(swm);
 
     MutexAutoLock lock(mPromiseProxy->Lock());
     if (mPromiseProxy->CleanedUp()) {
--- a/dom/xslt/xpath/txXPathObjectAdaptor.h
+++ b/dom/xslt/xpath/txXPathObjectAdaptor.h
@@ -22,17 +22,17 @@ public:
     {
         NS_ASSERTION(aValue,
                      "Don't create a txXPathObjectAdaptor if you don't have a "
                      "txAExprResult");
     }
 
     NS_DECL_ISUPPORTS
 
-    NS_IMETHODIMP_(txAExprResult*) GetResult() override
+    NS_IMETHOD_(txAExprResult*) GetResult() override
     {
         return mValue;
     }
 
 protected:
     txXPathObjectAdaptor() : mValue(nullptr)
     {
     }
--- a/extensions/cookie/nsPermissionManager.cpp
+++ b/extensions/cookie/nsPermissionManager.cpp
@@ -198,17 +198,17 @@ GetNextSubDomainForHost(const nsACString
 
 class ClearOriginDataObserver final : public nsIObserver {
   ~ClearOriginDataObserver() {}
 
 public:
   NS_DECL_ISUPPORTS
 
   // nsIObserver implementation.
-  NS_IMETHODIMP
+  NS_IMETHOD
   Observe(nsISupports* aSubject, const char* aTopic, const char16_t* aData) override
   {
     MOZ_ASSERT(!nsCRT::strcmp(aTopic, "clear-origin-data"));
 
     nsCOMPtr<nsIPermissionManager> permManager = do_GetService("@mozilla.org/permissionmanager;1");
     return permManager->RemovePermissionsWithAttributes(nsDependentString(aData));
   }
 };
--- a/gfx/layers/LayerScope.cpp
+++ b/gfx/layers/LayerScope.cpp
@@ -138,20 +138,20 @@ private:
     class SocketListener : public nsIServerSocketListener
     {
     public:
        NS_DECL_THREADSAFE_ISUPPORTS
 
        SocketListener() { }
 
        /* nsIServerSocketListener */
-       NS_IMETHODIMP OnSocketAccepted(nsIServerSocket *aServ,
-                                      nsISocketTransport *aTransport) override;
-       NS_IMETHODIMP OnStopListening(nsIServerSocket *aServ,
-                                   nsresult aStatus) override
+       NS_IMETHOD OnSocketAccepted(nsIServerSocket *aServ,
+                                   nsISocketTransport *aTransport) override;
+       NS_IMETHOD OnStopListening(nsIServerSocket *aServ,
+                                  nsresult aStatus) override
        {
            return NS_OK;
        }
     private:
        virtual ~SocketListener() { }
     };
 
     /*
@@ -166,17 +166,17 @@ private:
             : mState(NoHandshake)
             , mConnected(false)
         { }
 
         void OpenStream(nsISocketTransport* aTransport);
         bool WriteToStream(void *aPtr, uint32_t aSize);
 
         // nsIInputStreamCallback
-        NS_IMETHODIMP OnInputStreamReady(nsIAsyncInputStream *aStream) override;
+        NS_IMETHOD OnInputStreamReady(nsIAsyncInputStream *aStream) override;
 
     private:
         virtual ~SocketHandler() { CloseConnection(); }
 
         void ReadInputStreamData(nsTArray<nsCString>& aProtocolString);
         bool WebSocketHandshake(nsTArray<nsCString>& aProtocolString);
         void ApplyMask(uint32_t aMask, uint8_t *aData, uint64_t aLen);
         bool HandleDataFrame(uint8_t *aData, uint32_t aSize);
@@ -792,17 +792,17 @@ public:
     public:
         NS_DECL_THREADSAFE_ISUPPORTS
 
         AppendTask(DebugDataSender *host, DebugGLData *d)
             : mData(d),
               mHost(host)
         {  }
 
-        NS_IMETHODIMP Run() override {
+        NS_IMETHOD Run() override {
             mHost->mList.insertBack(mData);
             return NS_OK;
         }
 
     private:
         virtual ~AppendTask() { }
 
         DebugGLData *mData;
@@ -816,17 +816,17 @@ public:
     class ClearTask: public nsIRunnable
     {
     public:
         NS_DECL_THREADSAFE_ISUPPORTS
         explicit ClearTask(DebugDataSender *host)
             : mHost(host)
         {  }
 
-        NS_IMETHODIMP Run() override {
+        NS_IMETHOD Run() override {
             mHost->RemoveData();
             return NS_OK;
         }
 
     private:
         virtual ~ClearTask() { }
 
         RefPtr<DebugDataSender> mHost;
@@ -838,17 +838,17 @@ public:
     {
     public:
         NS_DECL_THREADSAFE_ISUPPORTS
 
         explicit SendTask(DebugDataSender *host)
             : mHost(host)
         {  }
 
-        NS_IMETHODIMP Run() override {
+        NS_IMETHOD Run() override {
             // Sendout all appended debug data.
             DebugGLData *d = nullptr;
             while ((d = mHost->mList.popFirst()) != nullptr) {
                 UniquePtr<DebugGLData> cleaner(d);
                 if (!d->Write()) {
                     gLayerScopeManager.DestroyServerSocket();
                     break;
                 }
--- a/gfx/layers/apz/util/APZEventState.cpp
+++ b/gfx/layers/apz/util/APZEventState.cpp
@@ -133,17 +133,17 @@ public:
     : mWidget(aWidget)
     , mPoint(aPoint)
     , mModifiers(aModifiers)
     // Hold the reference count until we are called back.
     , mTimer(aTimer)
   {
   }
 
-  NS_IMETHODIMP Notify(nsITimer*) override
+  NS_IMETHOD Notify(nsITimer*) override
   {
     if (nsCOMPtr<nsIWidget> widget = do_QueryReferent(mWidget)) {
       APZCCallbackHelper::FireSingleTapEvent(mPoint, mModifiers, widget);
     }
     mTimer = nullptr;
     return NS_OK;
   }
 
--- a/gfx/layers/apz/util/APZThreadUtils.h
+++ b/gfx/layers/apz/util/APZThreadUtils.h
@@ -73,17 +73,17 @@ protected:
 // An nsITimerCallback implementation that can be used with any function
 // object that's callable with no arguments.
 template <typename Function>
 class GenericTimerCallback final : public GenericTimerCallbackBase
 {
 public:
   explicit GenericTimerCallback(const Function& aFunction) : mFunction(aFunction) {}
 
-  NS_IMETHODIMP Notify(nsITimer*) override
+  NS_IMETHOD Notify(nsITimer*) override
   {
     mFunction();
     return NS_OK;
   }
 private:
   Function mFunction;
 };
 
--- a/intl/unicharutil/nsSaveAsCharset.h
+++ b/intl/unicharutil/nsSaveAsCharset.h
@@ -19,17 +19,17 @@ public:
   nsSaveAsCharset();
 
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD Init(const nsACString& aCharset, uint32_t aIgnored, uint32_t aAlsoIgnored) override;
 
   NS_IMETHOD Convert(const nsAString& ain, nsACString& aOut) override;
 
-  NS_IMETHODIMP GetCharset(nsACString& aCharset) override;
+  NS_IMETHOD GetCharset(nsACString& aCharset) override;
 
 private:
 
   virtual ~nsSaveAsCharset();
 
   nsAutoPtr<nsNCRFallbackEncoderWrapper> mEncoder;
   nsCString mCharset;
 };
--- a/ipc/hal/DaemonRunnables.h
+++ b/ipc/hal/DaemonRunnables.h
@@ -79,17 +79,17 @@ public:
     }
     RefPtr<SelfType> runnable = Create(aObj, aMethod, aInitOp);
     if (!runnable) {
       return;
     }
     Unused << NS_WARN_IF(NS_FAILED(NS_DispatchToMainThread(runnable)));
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     ((*mObj).*mMethod)();
     return NS_OK;
   }
 
 private:
   DaemonResultRunnable0(Obj* aObj, Res (Obj::*aMethod)())
     : mObj(aObj)
@@ -135,17 +135,17 @@ public:
     }
     RefPtr<SelfType> runnable = Create(aObj, aMethod, aInitOp);
     if (!runnable) {
       return;
     }
     Unused << NS_WARN_IF(NS_FAILED(NS_DispatchToMainThread(runnable)));
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     ((*mObj).*mMethod)(ConvertArg<Arg1>(mArg1));
     return NS_OK;
   }
 
 private:
   DaemonResultRunnable1(Obj* aObj, Res (Obj::*aMethod)(Arg1))
     : mObj(aObj)
@@ -198,17 +198,17 @@ public:
     }
     RefPtr<SelfType> runnable = Create(aObj, aMethod, aInitOp);
     if (!runnable) {
       return;
     }
     Unused << NS_WARN_IF(NS_FAILED(NS_DispatchToMainThread(runnable)));
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     ((*mObj).*mMethod)(ConvertArg<Arg1>(mArg1),
                        ConvertArg<Arg2>(mArg2),
                        ConvertArg<Arg3>(mArg3));
     return NS_OK;
   }
 
 private:
@@ -275,17 +275,17 @@ public:
   {
     RefPtr<SelfType> runnable = Create(aMethod, aInitOp);
     if (!runnable) {
       return;
     }
     Unused << NS_WARN_IF(NS_FAILED(NS_DispatchToMainThread(runnable)));
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     ObjectType* obj = ObjectWrapper::GetInstance();
     if (!obj) {
       NS_WARNING("Notification handler not initialized");
     } else {
       ((*obj).*mMethod)();
@@ -335,17 +335,17 @@ public:
   {
     RefPtr<SelfType> runnable = Create(aMethod, aInitOp);
     if (!runnable) {
       return;
     }
     Unused << NS_WARN_IF(NS_FAILED(NS_DispatchToMainThread(runnable)));
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     ObjectType* obj = ObjectWrapper::GetInstance();
     if (!obj) {
       NS_WARNING("Notification handler not initialized");
     } else {
       ((*obj).*mMethod)(ConvertArg<Arg1>(mArg1));
@@ -402,17 +402,17 @@ public:
   {
     RefPtr<SelfType> runnable = Create(aMethod, aInitOp);
     if (!runnable) {
       return;
     }
     Unused << NS_WARN_IF(NS_FAILED(NS_DispatchToMainThread(runnable)));
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     ObjectType* obj = ObjectWrapper::GetInstance();
     if (!obj) {
       NS_WARNING("Notification handler not initialized");
     } else {
       ((*obj).*mMethod)(ConvertArg<Arg1>(mArg1),
@@ -473,17 +473,17 @@ public:
   {
     RefPtr<SelfType> runnable = Create(aMethod, aInitOp);
     if (!runnable) {
       return;
     }
     Unused << NS_WARN_IF(NS_FAILED(NS_DispatchToMainThread(runnable)));
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     ObjectType* obj = ObjectWrapper::GetInstance();
     if (!obj) {
       NS_WARNING("Notification handler not initialized");
     } else {
       ((*obj).*mMethod)(ConvertArg<Arg1>(mArg1),
@@ -547,17 +547,17 @@ public:
   {
     RefPtr<SelfType> runnable = Create(aMethod, aInitOp);
     if (!runnable) {
       return;
     }
     Unused << NS_WARN_IF(NS_FAILED(NS_DispatchToMainThread(runnable)));
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     ObjectType* obj = ObjectWrapper::GetInstance();
     if (!obj) {
       NS_WARNING("Notification handler not initialized");
     } else {
       ((*obj).*mMethod)(ConvertArg<Arg1>(mArg1),
@@ -624,17 +624,17 @@ public:
   {
     RefPtr<SelfType> runnable = Create(aMethod, aInitOp);
     if (!runnable) {
       return;
     }
     Unused << NS_WARN_IF(NS_FAILED(NS_DispatchToMainThread(runnable)));
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     ObjectType* obj = ObjectWrapper::GetInstance();
     if (!obj) {
       NS_WARNING("Notification handler not initialized");
     } else {
       ((*obj).*mMethod)(ConvertArg<Arg1>(mArg1),
@@ -704,17 +704,17 @@ public:
   {
     RefPtr<SelfType> runnable = Create(aMethod, aInitOp);
     if (!runnable) {
       return;
     }
     Unused << NS_WARN_IF(NS_FAILED(NS_DispatchToMainThread(runnable)));
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     ObjectType* obj = ObjectWrapper::GetInstance();
     if (!obj) {
       NS_WARNING("Notification handler not initialized");
     } else {
       ((*obj).*mMethod)(ConvertArg<Arg1>(mArg1),
@@ -791,17 +791,17 @@ public:
   {
     RefPtr<SelfType> runnable = Create(aMethod, aInitOp);
     if (!runnable) {
       return;
     }
     Unused << NS_WARN_IF(NS_FAILED(NS_DispatchToMainThread(runnable)));
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     ObjectType* obj = ObjectWrapper::GetInstance();
     if (!obj) {
       NS_WARNING("Notification handler not initialized");
     } else {
       ((*obj).*mMethod)(ConvertArg<Arg1>(mArg1),
@@ -885,17 +885,17 @@ public:
   {
     RefPtr<SelfType> runnable = Create(aMethod, aInitOp);
     if (!runnable) {
       return;
     }
     Unused << NS_WARN_IF(NS_FAILED(NS_DispatchToMainThread(runnable)));
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     ObjectType* obj = ObjectWrapper::GetInstance();
     if (!obj) {
       NS_WARNING("Notification handler not initialized");
     } else {
       ((*obj).*mMethod)(ConvertArg<Arg1>(mArg1),
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -3639,17 +3639,17 @@ PresShell::GetRectVisibility(nsIFrame* a
 
 class PaintTimerCallBack final : public nsITimerCallback
 {
 public:
   explicit PaintTimerCallBack(PresShell* aShell) : mShell(aShell) {}
 
   NS_DECL_ISUPPORTS
 
-  NS_IMETHODIMP Notify(nsITimer* aTimer) final
+  NS_IMETHOD Notify(nsITimer* aTimer) final
   {
     mShell->SetNextPaintCompressed();
     mShell->AddInvalidateHiddenPresShellObserver(mShell->GetPresContext()->RefreshDriver());
     mShell->ScheduleViewManagerFlush();
     return NS_OK;
   }
 
 private:
--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -400,17 +400,17 @@ public:
     return false;
   }
 
   virtual void ReflowCallbackCanceled() override
   {
     NS_RELEASE_THIS();
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     if (mFrame.IsAlive()) {
       static_cast<nsComboboxControlFrame*>(mFrame.GetFrame())->
         AbsolutelyPositionDropDown();
     }
     return NS_OK;
   }
 
--- a/layout/forms/nsNumberControlFrame.cpp
+++ b/layout/forms/nsNumberControlFrame.cpp
@@ -303,17 +303,17 @@ nsNumberControlFrame::GetTextFieldFrame(
 class FocusTextField : public Runnable
 {
 public:
   FocusTextField(nsIContent* aNumber, nsIContent* aTextField)
     : mNumber(aNumber),
       mTextField(aTextField)
   {}
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     if (mNumber->AsElement()->State().HasState(NS_EVENT_STATE_FOCUS)) {
       HTMLInputElement::FromContent(mTextField)->Focus();
     }
 
     return NS_OK;
   }
 
--- a/media/webrtc/signaling/src/media-conduit/WebrtcMediaCodecVP8VideoCodec.cpp
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcMediaCodecVP8VideoCodec.cpp
@@ -103,17 +103,17 @@ public:
 
     MOZ_ASSERT(mThread);
 
     mInputFrames.push(aFrame);
     // Notify Run() about queued input and it can start working.
     lock.NotifyAll();
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     MOZ_ASSERT(mThread);
 
     MonitorAutoLock lock(mMonitor);
     while (true) {
       if (mInputFrames.empty()) {
         // Wait for new input.
         lock.Wait();
--- a/media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp
@@ -165,17 +165,17 @@ public:
 
     MOZ_ASSERT(mThread);
 
     mInputFrames.push(aFrame);
     // Notify Run() about queued input and it can start working.
     lock.NotifyAll();
   }
 
-  NS_IMETHODIMP Run() override
+  NS_IMETHOD Run() override
   {
     MonitorAutoLock lock(mMonitor);
     if (mEnding) {
       return NS_OK;
     }
     MOZ_ASSERT(mThread);
 
     while (true) {
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp
@@ -54,18 +54,18 @@ public:
       rv = observerService->AddObserver(this,
                                         NS_XPCOM_SHUTDOWN_OBSERVER_ID,
                                         false);
       MOZ_ALWAYS_SUCCEEDS(rv);
 #endif
       (void) rv;
     }
 
-  NS_IMETHODIMP Observe(nsISupports* aSubject, const char* aTopic,
-                        const char16_t* aData) override {
+  NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic,
+                     const char16_t* aData) override {
     if (strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID) == 0) {
       CSFLogDebug(logTag, "Shutting down PeerConnectionCtx");
       PeerConnectionCtx::Destroy();
 
       nsCOMPtr<nsIObserverService> observerService =
         services::GetObserverService();
       if (!observerService)
         return NS_ERROR_FAILURE;
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h
@@ -437,20 +437,20 @@ class PeerConnectionMedia : public sigsl
 
  private:
   nsresult InitProxy();
   class ProtocolProxyQueryHandler : public nsIProtocolProxyCallback {
    public:
     explicit ProtocolProxyQueryHandler(PeerConnectionMedia *pcm) :
       pcm_(pcm) {}
 
-    NS_IMETHODIMP OnProxyAvailable(nsICancelable *request,
-                                   nsIChannel *aChannel,
-                                   nsIProxyInfo *proxyinfo,
-                                   nsresult result) override;
+    NS_IMETHOD OnProxyAvailable(nsICancelable *request,
+                                nsIChannel *aChannel,
+                                nsIProxyInfo *proxyinfo,
+                                nsresult result) override;
     NS_DECL_ISUPPORTS
 
    private:
     void SetProxyOnPcm(nsIProxyInfo& proxyinfo);
     RefPtr<PeerConnectionMedia> pcm_;
     virtual ~ProtocolProxyQueryHandler() {}
   };
 
--- a/netwerk/base/ProxyAutoConfig.cpp
+++ b/netwerk/base/ProxyAutoConfig.cpp
@@ -269,33 +269,33 @@ public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
   PACResolver()
     : mStatus(NS_ERROR_FAILURE)
   {
   }
 
   // nsIDNSListener
-  NS_IMETHODIMP OnLookupComplete(nsICancelable *request,
-                                 nsIDNSRecord *record,
-                                 nsresult status) override
+  NS_IMETHOD OnLookupComplete(nsICancelable *request,
+                              nsIDNSRecord *record,
+                              nsresult status) override
   {
     if (mTimer) {
       mTimer->Cancel();
       mTimer = nullptr;
     }
 
     mRequest = nullptr;
     mStatus = status;
     mResponse = record;
     return NS_OK;
   }
 
   // nsITimerCallback
-  NS_IMETHODIMP Notify(nsITimer *timer) override
+  NS_IMETHOD Notify(nsITimer *timer) override
   {
     if (mRequest)
       mRequest->Cancel(NS_ERROR_NET_TIMEOUT);
     mTimer = nullptr;
     return NS_OK;
   }
 
   nsresult                mStatus;
--- a/netwerk/base/nsFileStreams.h
+++ b/netwerk/base/nsFileStreams.h
@@ -249,19 +249,19 @@ public:
     NS_DECL_NSISAFEOUTPUTSTREAM
 
     nsAtomicFileOutputStream() :
         mTargetFileExists(true),
         mWriteResult(NS_OK) {}
 
     virtual nsresult DoOpen() override;
 
-    NS_IMETHODIMP Close() override;
-    NS_IMETHODIMP Write(const char *buf, uint32_t count, uint32_t *result) override;
-    NS_IMETHODIMP Init(nsIFile* file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags) override;
+    NS_IMETHOD Close() override;
+    NS_IMETHOD Write(const char *buf, uint32_t count, uint32_t *result) override;
+    NS_IMETHOD Init(nsIFile* file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags) override;
 
 protected:
     virtual ~nsAtomicFileOutputStream()
     {
         Close();
     }
 
     nsCOMPtr<nsIFile>         mTargetFile;
--- a/netwerk/base/nsIOService.h
+++ b/netwerk/base/nsIOService.h
@@ -211,23 +211,23 @@ class nsAppOfflineInfo : public nsIAppOf
 {
     NS_DECL_THREADSAFE_ISUPPORTS
 public:
     nsAppOfflineInfo(uint32_t aAppId, int32_t aMode)
         : mAppId(aAppId), mMode(aMode)
     {
     }
 
-    NS_IMETHODIMP GetMode(int32_t *aMode) override
+    NS_IMETHOD GetMode(int32_t *aMode) override
     {
         *aMode = mMode;
         return NS_OK;
     }
 
-    NS_IMETHODIMP GetAppId(uint32_t *aAppId) override
+    NS_IMETHOD GetAppId(uint32_t *aAppId) override
     {
         *aAppId = mAppId;
         return NS_OK;
     }
 
 private:
     virtual ~nsAppOfflineInfo() {}
 
--- a/netwerk/cache/nsApplicationCacheService.cpp
+++ b/netwerk/cache/nsApplicationCacheService.cpp
@@ -229,17 +229,17 @@ nsApplicationCacheService::GetGroupsTime
 
 namespace {
 
 class AppCacheClearDataObserver final : public nsIObserver {
 public:
     NS_DECL_ISUPPORTS
 
     // nsIObserver implementation.
-    NS_IMETHODIMP
+    NS_IMETHOD
     Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData) override
     {
         MOZ_ASSERT(!nsCRT::strcmp(aTopic, "clear-origin-data"));
 
         nsresult rv;
 
         nsCOMPtr<nsIApplicationCacheService> cacheService =
             do_GetService(NS_APPLICATIONCACHESERVICE_CONTRACTID, &rv);
--- a/netwerk/cookie/nsCookieService.cpp
+++ b/netwerk/cookie/nsCookieService.cpp
@@ -565,17 +565,17 @@ namespace {
 class AppClearDataObserver final : public nsIObserver {
 
   ~AppClearDataObserver() {}
 
 public:
   NS_DECL_ISUPPORTS
 
   // nsIObserver implementation.
-  NS_IMETHODIMP
+  NS_IMETHOD
   Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData) override
   {
     MOZ_ASSERT(!nsCRT::strcmp(aTopic, TOPIC_CLEAR_ORIGIN_DATA));
 
     MOZ_ASSERT(XRE_IsParentProcess());
 
     nsCOMPtr<nsICookieManager2> cookieManager
       = do_GetService(NS_COOKIEMANAGER_CONTRACTID);
--- a/netwerk/dns/mdns/libmdns/MDNSResponderReply.h
+++ b/netwerk/dns/mdns/libmdns/MDNSResponderReply.h
@@ -24,17 +24,17 @@ public:
                       DNSServiceFlags aFlags,
                       uint32_t aInterfaceIndex,
                       DNSServiceErrorType aErrorCode,
                       const nsACString& aServiceName,
                       const nsACString& aRegType,
                       const nsACString& aReplyDomain,
                       BrowseOperator* aContext);
 
-  NS_IMETHODIMP Run() override;
+  NS_IMETHOD Run() override;
 
   static void Reply(DNSServiceRef aSdRef,
                     DNSServiceFlags aFlags,
                     uint32_t aInterfaceIndex,
                     DNSServiceErrorType aErrorCode,
                     const char* aServiceName,
                     const char* aRegType,
                     const char* aReplyDomain,
@@ -57,17 +57,17 @@ public:
   RegisterReplyRunnable(DNSServiceRef aSdRef,
                         DNSServiceFlags aFlags,
                         DNSServiceErrorType aErrorCode,
                         const nsACString& aName,
                         const nsACString& aRegType,
                         const nsACString& aDomain,
                         RegisterOperator* aContext);
 
-  NS_IMETHODIMP Run() override;
+  NS_IMETHOD Run() override;
 
   static void Reply(DNSServiceRef aSdRef,
                     DNSServiceFlags aFlags,
                     DNSServiceErrorType aErrorCode,
                     const char* aName,
                     const char* aRegType,
                     const char* aDomain,
                     void* aContext);
@@ -92,17 +92,17 @@ public:
                        const nsACString& aFullName,
                        const nsACString& aHostTarget,
                        uint16_t aPort,
                        uint16_t aTxtLen,
                        const unsigned char* aTxtRecord,
                        ResolveOperator* aContext);
   ~ResolveReplyRunnable();
 
-  NS_IMETHODIMP Run() override;
+  NS_IMETHOD Run() override;
 
   static void Reply(DNSServiceRef aSdRef,
                     DNSServiceFlags aFlags,
                     uint32_t aInterfaceIndex,
                     DNSServiceErrorType aErrorCode,
                     const char* aFullName,
                     const char* aHostTarget,
                     uint16_t aPort,
@@ -131,17 +131,17 @@ public:
                            uint32_t aInterfaceIndex,
                            DNSServiceErrorType aErrorCode,
                            const nsACString& aHostName,
                            const mozilla::net::NetAddr& aAddress,
                            uint32_t aTTL,
                            GetAddrInfoOperator* aContext);
   ~GetAddrInfoReplyRunnable();
 
-  NS_IMETHODIMP Run() override;
+  NS_IMETHOD Run() override;
 
   static void Reply(DNSServiceRef aSdRef,
                     DNSServiceFlags aFlags,
                     uint32_t aInterfaceIndex,
                     DNSServiceErrorType aErrorCode,
                     const char* aHostName,
                     const struct sockaddr* aAddress,
                     uint32_t aTTL,
--- a/netwerk/protocol/file/nsFileChannel.cpp
+++ b/netwerk/protocol/file/nsFileChannel.cpp
@@ -176,20 +176,20 @@ public:
     , mCopyEvent(new nsFileCopyEvent(dest, source, len))
     , mSink(sink) {
   }
 
   bool IsInitialized() {
     return mCopyEvent != nullptr;
   }
 
-  NS_IMETHODIMP ReadSegments(nsWriteSegmentFun fun, void *closure,
-                             uint32_t count, uint32_t *result) override;
-  NS_IMETHODIMP AsyncWait(nsIInputStreamCallback *callback, uint32_t flags,
-                          uint32_t count, nsIEventTarget *target) override;
+  NS_IMETHOD ReadSegments(nsWriteSegmentFun fun, void *closure,
+                          uint32_t count, uint32_t *result) override;
+  NS_IMETHOD AsyncWait(nsIInputStreamCallback *callback, uint32_t flags,
+                       uint32_t count, nsIEventTarget *target) override;
 
 private:
   virtual ~nsFileUploadContentStream() {}
 
   void OnCopyComplete();
 
   RefPtr<nsFileCopyEvent> mCopyEvent;
   nsCOMPtr<nsITransportEventSink> mSink;
--- a/netwerk/protocol/ftp/nsFTPChannel.h
+++ b/netwerk/protocol/ftp/nsFTPChannel.h
@@ -71,22 +71,22 @@ public:
     // ID of the entity to resume downloading
     const nsCString &EntityID() {
         return mEntityID;
     }
     void SetEntityID(const nsCSubstring &entityID) {
         mEntityID = entityID;
     }
 
-    NS_IMETHODIMP GetLastModifiedTime(PRTime* lastModifiedTime) override {
+    NS_IMETHOD GetLastModifiedTime(PRTime* lastModifiedTime) override {
         *lastModifiedTime = mLastModifiedTime;
         return NS_OK;
     }
 
-    NS_IMETHODIMP SetLastModifiedTime(PRTime lastModifiedTime) override {
+    NS_IMETHOD SetLastModifiedTime(PRTime lastModifiedTime) override {
         mLastModifiedTime = lastModifiedTime;
         return NS_OK;
     }
 
     // Data stream to upload
     nsIInputStream *UploadStream() {
         return mUploadStream;
     }
--- a/netwerk/protocol/http/Http2Compression.cpp
+++ b/netwerk/protocol/http/Http2Compression.cpp
@@ -26,17 +26,17 @@ static nsDeque *gStaticHeaders = nullptr
 
 class HpackStaticTableReporter final : public nsIMemoryReporter
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
   HpackStaticTableReporter() {}
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   CollectReports(nsIHandleReportCallback* aHandleReport, nsISupports* aData,
                  bool aAnonymize) override
   {
     return MOZ_COLLECT_REPORT(
       "explicit/network/hpack/static-table", KIND_HEAP, UNITS_BYTES,
       gStaticHeaders->SizeOfIncludingThis(MallocSizeOf),
       "Memory usage of HPACK static table.");
   }
@@ -53,17 +53,17 @@ class HpackDynamicTableReporter final : 
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
   explicit HpackDynamicTableReporter(Http2BaseCompressor* aCompressor)
     : mCompressor(aCompressor)
   {}
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   CollectReports(nsIHandleReportCallback* aHandleReport, nsISupports* aData,
                  bool aAnonymize) override
   {
     if (!mCompressor) {
       return NS_OK;
     }
 
     return MOZ_COLLECT_REPORT(
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -878,31 +878,31 @@ class InterceptFailedOnStop : public nsI
   HttpBaseChannel *mChannel;
 
 public:
   InterceptFailedOnStop(nsIStreamListener *arg, HttpBaseChannel *chan)
   : mNext(arg)
   , mChannel(chan) {}
   NS_DECL_ISUPPORTS
 
-  NS_IMETHODIMP OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) override
+  NS_IMETHOD OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) override
   {
     return mNext->OnStartRequest(aRequest, aContext);
   }
 
-  NS_IMETHODIMP OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode) override
+  NS_IMETHOD OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode) override
   {
     if (NS_FAILED(aStatusCode) && NS_SUCCEEDED(mChannel->mStatus)) {
       LOG(("HttpBaseChannel::InterceptFailedOnStop %p seting status %x", mChannel, aStatusCode));
       mChannel->mStatus = aStatusCode;
     }
     return mNext->OnStopRequest(aRequest, aContext, aStatusCode);
   }
 
-  NS_IMETHODIMP OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
+  NS_IMETHOD OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
                            nsIInputStream *aInputStream, uint64_t aOffset,
                            uint32_t aCount) override
   {
     return mNext->OnDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount);
   }
 };
 
 NS_IMPL_ISUPPORTS(InterceptFailedOnStop, nsIStreamListener, nsIRequestObserver)
--- a/netwerk/protocol/http/TunnelUtils.cpp
+++ b/netwerk/protocol/http/TunnelUtils.cpp
@@ -773,33 +773,33 @@ class SocketInWrapper : public nsIAsyncI
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_FORWARD_NSIASYNCINPUTSTREAM(mStream->)
 
   SocketInWrapper(nsIAsyncInputStream *aWrapped, TLSFilterTransaction *aFilter)
     : mStream(aWrapped)
     , mTLSFilter(aFilter)
   { }
 
-  NS_IMETHODIMP Close() override
+  NS_IMETHOD Close() override
   {
     mTLSFilter = nullptr;
     return mStream->Close();
   }
 
-  NS_IMETHODIMP Available(uint64_t *_retval) override
+  NS_IMETHOD Available(uint64_t *_retval) override
   {
     return mStream->Available(_retval);
   }
 
-  NS_IMETHODIMP IsNonBlocking(bool *_retval) override
+  NS_IMETHOD IsNonBlocking(bool *_retval) override
   {
     return mStream->IsNonBlocking(_retval);
   }
 
-  NS_IMETHODIMP ReadSegments(nsWriteSegmentFun aWriter, void *aClosure, uint32_t aCount, uint32_t *_retval) override
+  NS_IMETHOD ReadSegments(nsWriteSegmentFun aWriter, void *aClosure, uint32_t aCount, uint32_t *_retval) override
   {
     return mStream->ReadSegments(aWriter, aClosure, aCount, _retval);
   }
 
   // finally, ones that don't get forwarded :)
   NS_IMETHOD Read(char *aBuf, uint32_t aCount, uint32_t *_retval) override;
   virtual nsresult OnWriteSegment(char *segment, uint32_t count, uint32_t *countWritten) override;
 
@@ -840,38 +840,38 @@ class SocketOutWrapper : public nsIAsync
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_FORWARD_NSIASYNCOUTPUTSTREAM(mStream->)
 
   SocketOutWrapper(nsIAsyncOutputStream *aWrapped, TLSFilterTransaction *aFilter)
     : mStream(aWrapped)
     , mTLSFilter(aFilter)
   { }
 
-  NS_IMETHODIMP Close() override
+  NS_IMETHOD Close() override
   {
     mTLSFilter = nullptr;
     return mStream->Close();
   }
 
-  NS_IMETHODIMP Flush() override
+  NS_IMETHOD Flush() override
   {
     return mStream->Flush();
   }
 
-  NS_IMETHODIMP IsNonBlocking(bool *_retval) override
+  NS_IMETHOD IsNonBlocking(bool *_retval) override
   {
     return mStream->IsNonBlocking(_retval);
   }
 
-  NS_IMETHODIMP WriteSegments(nsReadSegmentFun aReader, void *aClosure, uint32_t aCount, uint32_t *_retval) override
+  NS_IMETHOD WriteSegments(nsReadSegmentFun aReader, void *aClosure, uint32_t aCount, uint32_t *_retval) override
   {
     return mStream->WriteSegments(aReader, aClosure, aCount, _retval);
   }
 
-  NS_IMETHODIMP WriteFrom(nsIInputStream *aFromStream, uint32_t aCount, uint32_t *_retval) override
+  NS_IMETHOD WriteFrom(nsIInputStream *aFromStream, uint32_t aCount, uint32_t *_retval) override
   {
     return mStream->WriteFrom(aFromStream, aCount, _retval);
   }
 
   // finally, ones that don't get forwarded :)
   NS_IMETHOD Write(const char *aBuf, uint32_t aCount, uint32_t *_retval) override;
   virtual nsresult OnReadSegment(const char *segment, uint32_t count, uint32_t *countRead) override;
 
--- a/netwerk/sctp/datachannel/DataChannel.cpp
+++ b/netwerk/sctp/datachannel/DataChannel.cpp
@@ -94,18 +94,18 @@ public:
     }
 
 private:
   // The only instance of DataChannelShutdown is owned by the observer
   // service, so there is no need to call RemoveObserver here.
   virtual ~DataChannelShutdown() {}
 
 public:
-  NS_IMETHODIMP Observe(nsISupports* aSubject, const char* aTopic,
-                        const char16_t* aData) override {
+  NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic,
+                     const char16_t* aData) override {
     if (strcmp(aTopic, "xpcom-will-shutdown") == 0) {
       LOG(("Shutting down SCTP"));
       if (sctp_initialized) {
         usrsctp_finish();
         sctp_initialized = false;
       }
       nsCOMPtr<nsIObserverService> observerService =
         mozilla::services::GetObserverService();
--- a/parser/html/nsHtml5Module.cpp
+++ b/parser/html/nsHtml5Module.cpp
@@ -87,17 +87,17 @@ nsHtml5Module::Initialize(nsIParser* aPa
 
 class nsHtml5ParserThreadTerminator final : public nsIObserver
 {
   public:
     NS_DECL_ISUPPORTS
     explicit nsHtml5ParserThreadTerminator(nsIThread* aThread)
       : mThread(aThread)
     {}
-    NS_IMETHODIMP Observe(nsISupports *, const char *topic, const char16_t *) override
+    NS_IMETHOD Observe(nsISupports *, const char *topic, const char16_t *) override
     {
       NS_ASSERTION(!strcmp(topic, "xpcom-shutdown-threads"), 
                    "Unexpected topic");
       if (mThread) {
         mThread->Shutdown();
         mThread = nullptr;
       }
       return NS_OK;
--- a/parser/html/nsHtml5Parser.h
+++ b/parser/html/nsHtml5Parser.h
@@ -170,17 +170,17 @@ class nsHtml5Parser final : public nsIPa
     /**
      * Don't call. For interface compat only.
      */
     NS_IMETHOD BuildModel() override;
 
     /**
      * Don't call. For interface compat only.
      */
-    NS_IMETHODIMP CancelParsingEvents() override;
+    NS_IMETHOD CancelParsingEvents() override;
 
     /**
      * Don't call. For interface compat only.
      */
     virtual void Reset() override;
 
     /**
      * True if the insertion point (per HTML5) is defined.
--- a/parser/htmlparser/nsParser.h
+++ b/parser/htmlparser/nsParser.h
@@ -243,17 +243,17 @@ class nsParser final : public nsIParser,
 
     void SetSinkCharset(nsACString& aCharset);
 
     /**
      *  Removes continue parsing events
      *  @update  kmcclusk 5/18/98
      */
 
-    NS_IMETHODIMP CancelParsingEvents() override;
+    NS_IMETHOD CancelParsingEvents() override;
 
     /**
      * Return true.
      */
     virtual bool IsInsertionPointDefined() override;
 
     /**
      * No-op.
--- a/storage/mozStorageAsyncStatement.cpp
+++ b/storage/mozStorageAsyncStatement.cpp
@@ -43,59 +43,59 @@ NS_IMPL_CI_INTERFACE_GETTER(AsyncStateme
 
 class AsyncStatementClassInfo : public nsIClassInfo
 {
 public:
   constexpr AsyncStatementClassInfo() {}
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   GetInterfaces(uint32_t *_count, nsIID ***_array) override
   {
     return NS_CI_INTERFACE_GETTER_NAME(AsyncStatement)(_count, _array);
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   GetScriptableHelper(nsIXPCScriptable **_helper) override
   {
     static AsyncStatementJSHelper sJSHelper;
     *_helper = &sJSHelper;
     return NS_OK;
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   GetContractID(char **_contractID) override
   {
     *_contractID = nullptr;
     return NS_OK;
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   GetClassDescription(char **_desc) override
   {
     *_desc = nullptr;
     return NS_OK;
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   GetClassID(nsCID **_id) override
   {
     *_id = nullptr;
     return NS_OK;
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   GetFlags(uint32_t *_flags) override
   {
     *_flags = 0;
     return NS_OK;
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   GetClassIDNoAlloc(nsCID *_cid) override
   {
     return NS_ERROR_NOT_AVAILABLE;
   }
 };
 
 NS_IMETHODIMP_(MozExternalRefCountType) AsyncStatementClassInfo::AddRef() { return 2; }
 NS_IMETHODIMP_(MozExternalRefCountType) AsyncStatementClassInfo::Release() { return 1; }
--- a/storage/mozStorageStatement.cpp
+++ b/storage/mozStorageStatement.cpp
@@ -45,59 +45,59 @@ NS_IMPL_CI_INTERFACE_GETTER(Statement,
 
 class StatementClassInfo : public nsIClassInfo
 {
 public:
   constexpr StatementClassInfo() {}
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   GetInterfaces(uint32_t *_count, nsIID ***_array) override
   {
     return NS_CI_INTERFACE_GETTER_NAME(Statement)(_count, _array);
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   GetScriptableHelper(nsIXPCScriptable **_helper) override
   {
     static StatementJSHelper sJSHelper;
     *_helper = &sJSHelper;
     return NS_OK;
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   GetContractID(char **_contractID) override
   {
     *_contractID = nullptr;
     return NS_OK;
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   GetClassDescription(char **_desc) override
   {
     *_desc = nullptr;
     return NS_OK;
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   GetClassID(nsCID **_id) override
   {
     *_id = nullptr;
     return NS_OK;
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   GetFlags(uint32_t *_flags) override
   {
     *_flags = 0;
     return NS_OK;
   }
 
-  NS_IMETHODIMP
+  NS_IMETHOD
   GetClassIDNoAlloc(nsCID *_cid) override
   {
     return NS_ERROR_NOT_AVAILABLE;
   }
 };
 
 NS_IMETHODIMP_(MozExternalRefCountType) StatementClassInfo::AddRef() { return 2; }
 NS_IMETHODIMP_(MozExternalRefCountType) StatementClassInfo::Release() { return 1; }
--- a/toolkit/components/downloads/nsDownloadProxy.h
+++ b/toolkit/components/downloads/nsDownloadProxy.h
@@ -28,24 +28,24 @@ protected:
   virtual ~nsDownloadProxy() { }
 
 public:
 
   nsDownloadProxy() { }
 
   NS_DECL_ISUPPORTS
 
-  NS_IMETHODIMP Init(nsIURI* aSource,
-                     nsIURI* aTarget,
-                     const nsAString& aDisplayName,
-                     nsIMIMEInfo *aMIMEInfo,
-                     PRTime aStartTime,
-                     nsIFile* aTempFile,
-                     nsICancelable* aCancelable,
-                     bool aIsPrivate) override {
+  NS_IMETHOD Init(nsIURI* aSource,
+                  nsIURI* aTarget,
+                  const nsAString& aDisplayName,
+                  nsIMIMEInfo *aMIMEInfo,
+                  PRTime aStartTime,
+                  nsIFile* aTempFile,
+                  nsICancelable* aCancelable,
+                  bool aIsPrivate) override {
     nsresult rv;
     nsCOMPtr<nsIDownloadManager> dm = do_GetService("@mozilla.org/download-manager;1", &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     
     rv = dm->AddDownload(nsIDownloadManager::DOWNLOAD_TYPE_DOWNLOAD, aSource,
                          aTarget, aDisplayName, aMIMEInfo, aStartTime,
                          aTempFile, aCancelable, aIsPrivate,
                          getter_AddRefs(mInner));
@@ -75,100 +75,100 @@ public:
       if (visible && !focusWhenStarting)
         return NS_OK;
 
       return dmui->Show(nullptr, mInner, nsIDownloadManagerUI::REASON_NEW_DOWNLOAD, aIsPrivate);
     }
     return rv;
   }
 
-  NS_IMETHODIMP OnStateChange(nsIWebProgress* aWebProgress,
-                              nsIRequest* aRequest, uint32_t aStateFlags,
-                              nsresult aStatus) override
+  NS_IMETHOD OnStateChange(nsIWebProgress* aWebProgress,
+                           nsIRequest* aRequest, uint32_t aStateFlags,
+                           nsresult aStatus) override
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->OnStateChange(aWebProgress, aRequest, aStateFlags, aStatus);
   }
-  
-  NS_IMETHODIMP OnStatusChange(nsIWebProgress *aWebProgress,
-                               nsIRequest *aRequest, nsresult aStatus,
-                               const char16_t *aMessage) override
+
+  NS_IMETHOD OnStatusChange(nsIWebProgress *aWebProgress,
+                            nsIRequest *aRequest, nsresult aStatus,
+                            const char16_t *aMessage) override
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->OnStatusChange(aWebProgress, aRequest, aStatus, aMessage);
   }
 
-  NS_IMETHODIMP OnLocationChange(nsIWebProgress *aWebProgress,
-                                 nsIRequest *aRequest, nsIURI *aLocation,
-                                 uint32_t aFlags) override
+  NS_IMETHOD OnLocationChange(nsIWebProgress *aWebProgress,
+                              nsIRequest *aRequest, nsIURI *aLocation,
+                              uint32_t aFlags) override
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->OnLocationChange(aWebProgress, aRequest, aLocation, aFlags);
   }
-  
-  NS_IMETHODIMP OnProgressChange(nsIWebProgress *aWebProgress,
-                                 nsIRequest *aRequest,
-                                 int32_t aCurSelfProgress,
-                                 int32_t aMaxSelfProgress,
-                                 int32_t aCurTotalProgress,
-                                 int32_t aMaxTotalProgress) override
+
+  NS_IMETHOD OnProgressChange(nsIWebProgress *aWebProgress,
+                              nsIRequest *aRequest,
+                              int32_t aCurSelfProgress,
+                              int32_t aMaxSelfProgress,
+                              int32_t aCurTotalProgress,
+                              int32_t aMaxTotalProgress) override
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->OnProgressChange(aWebProgress, aRequest,
                                     aCurSelfProgress,
                                     aMaxSelfProgress,
                                     aCurTotalProgress,
                                     aMaxTotalProgress);
   }
 
-  NS_IMETHODIMP OnProgressChange64(nsIWebProgress *aWebProgress,
-                                   nsIRequest *aRequest,
-                                   int64_t aCurSelfProgress,
-                                   int64_t aMaxSelfProgress,
-                                   int64_t aCurTotalProgress,
-                                   int64_t aMaxTotalProgress) override
+  NS_IMETHOD OnProgressChange64(nsIWebProgress *aWebProgress,
+                                nsIRequest *aRequest,
+                                int64_t aCurSelfProgress,
+                                int64_t aMaxSelfProgress,
+                                int64_t aCurTotalProgress,
+                                int64_t aMaxTotalProgress) override
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->OnProgressChange64(aWebProgress, aRequest,
                                       aCurSelfProgress,
                                       aMaxSelfProgress,
                                       aCurTotalProgress,
                                       aMaxTotalProgress);
   }
 
-  NS_IMETHODIMP OnRefreshAttempted(nsIWebProgress *aWebProgress,
-                                   nsIURI *aUri,
-                                   int32_t aDelay,
-                                   bool aSameUri,
-                                   bool *allowRefresh) override
+  NS_IMETHOD OnRefreshAttempted(nsIWebProgress *aWebProgress,
+                                nsIURI *aUri,
+                                int32_t aDelay,
+                                bool aSameUri,
+                                bool *allowRefresh) override
   {
     *allowRefresh = true;
     return NS_OK;
   }
 
-  NS_IMETHODIMP OnSecurityChange(nsIWebProgress *aWebProgress,
-                                 nsIRequest *aRequest, uint32_t aState) override
+  NS_IMETHOD OnSecurityChange(nsIWebProgress *aWebProgress,
+                              nsIRequest *aRequest, uint32_t aState) override
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->OnSecurityChange(aWebProgress, aRequest, aState);
   }
 
-  NS_IMETHODIMP SetSha256Hash(const nsACString& aHash) override
+  NS_IMETHOD SetSha256Hash(const nsACString& aHash) override
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->SetSha256Hash(aHash);
   }
 
-  NS_IMETHODIMP SetSignatureInfo(nsIArray* aSignatureInfo) override
+  NS_IMETHOD SetSignatureInfo(nsIArray* aSignatureInfo) override
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->SetSignatureInfo(aSignatureInfo);
   }
 
-  NS_IMETHODIMP SetRedirects(nsIArray* aRedirects) override
+  NS_IMETHOD SetRedirects(nsIArray* aRedirects) override
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->SetRedirects(aRedirects);
   }
 
 private:
   nsCOMPtr<nsIDownload> mInner;
 };
--- a/toolkit/components/filewatcher/NativeFileWatcherNotSupported.h
+++ b/toolkit/components/filewatcher/NativeFileWatcherNotSupported.h
@@ -18,28 +18,28 @@ public:
   {
   };
 
   nsresult Init()
   {
     return NS_OK;
   };
 
-  NS_IMETHODIMP AddPath(const nsAString& aPathToWatch,
-                        nsINativeFileWatcherCallback* aOnChange,
-                        nsINativeFileWatcherErrorCallback* aOnError,
-                        nsINativeFileWatcherSuccessCallback* aOnSuccess) override
+  NS_IMETHOD AddPath(const nsAString& aPathToWatch,
+                     nsINativeFileWatcherCallback* aOnChange,
+                     nsINativeFileWatcherErrorCallback* aOnError,
+                     nsINativeFileWatcherSuccessCallback* aOnSuccess) override
   {
     return NS_ERROR_NOT_IMPLEMENTED;
   };
 
-  NS_IMETHODIMP RemovePath(const nsAString& aPathToRemove,
-                           nsINativeFileWatcherCallback* aOnChange,
-                           nsINativeFileWatcherErrorCallback* aOnError,
-                           nsINativeFileWatcherSuccessCallback* aOnSuccess) override
+  NS_IMETHOD RemovePath(const nsAString& aPathToRemove,
+                        nsINativeFileWatcherCallback* aOnChange,
+                        nsINativeFileWatcherErrorCallback* aOnError,
+                        nsINativeFileWatcherSuccessCallback* aOnSuccess) override
   {
     return NS_ERROR_NOT_IMPLEMENTED;
   };
 
 private:
   ~NativeFileWatcherService() { };
   NativeFileWatcherService(const NativeFileWatcherService& other) = delete;
   void operator=(const NativeFileWatcherService& other) = delete;
--- a/tools/profiler/gecko/ThreadResponsiveness.cpp
+++ b/tools/profiler/gecko/ThreadResponsiveness.cpp
@@ -50,17 +50,17 @@ public:
     if (!mTimer) {
       mTimer = do_CreateInstance("@mozilla.org/timer;1");
     }
     mTimer->InitWithCallback(this, 16, nsITimer::TYPE_ONE_SHOT);
 
     return NS_OK;
   }
 
-  NS_IMETHODIMP Notify(nsITimer* aTimer) final
+  NS_IMETHOD Notify(nsITimer* aTimer) final
   {
     NS_DispatchToMainThread(this);
     return NS_OK;
   }
 
   void Terminate() {
     MonitorAutoLock mon(mMonitor);
     mStop = true;
--- a/widget/cocoa/nsPrintDialogX.h
+++ b/widget/cocoa/nsPrintDialogX.h
@@ -17,21 +17,21 @@ class nsIStringBundle;
 
 class nsPrintDialogServiceX : public nsIPrintDialogService
 {
 public:
   nsPrintDialogServiceX();
 
   NS_DECL_ISUPPORTS
 
-  NS_IMETHODIMP Init() override;
-  NS_IMETHODIMP Show(nsPIDOMWindowOuter *aParent, nsIPrintSettings *aSettings,
-                     nsIWebBrowserPrint *aWebBrowserPrint) override;
-  NS_IMETHODIMP ShowPageSetup(nsPIDOMWindowOuter *aParent,
-                              nsIPrintSettings *aSettings) override;
+  NS_IMETHOD Init() override;
+  NS_IMETHOD Show(nsPIDOMWindowOuter *aParent, nsIPrintSettings *aSettings,
+                  nsIWebBrowserPrint *aWebBrowserPrint) override;
+  NS_IMETHOD ShowPageSetup(nsPIDOMWindowOuter *aParent,
+                           nsIPrintSettings *aSettings) override;
 
 protected:
   virtual ~nsPrintDialogServiceX();
 };
 
 @interface PrintPanelAccessoryView : NSView
 {
   nsIPrintSettings* mSettings;
--- a/widget/gtk/nsFilePicker.h
+++ b/widget/gtk/nsFilePicker.h
@@ -20,29 +20,29 @@ class nsFilePicker : public nsBaseFilePi
 {
 public:
   nsFilePicker();
 
   NS_DECL_ISUPPORTS
 
   // nsIFilePicker (less what's in nsBaseFilePicker)
   NS_IMETHOD Open(nsIFilePickerShownCallback *aCallback) override;
-  NS_IMETHODIMP AppendFilters(int32_t aFilterMask) override;
-  NS_IMETHODIMP AppendFilter(const nsAString& aTitle,
-                             const nsAString& aFilter) override;
-  NS_IMETHODIMP SetDefaultString(const nsAString& aString) override;
-  NS_IMETHODIMP GetDefaultString(nsAString& aString) override;
-  NS_IMETHODIMP SetDefaultExtension(const nsAString& aExtension) override;
-  NS_IMETHODIMP GetDefaultExtension(nsAString& aExtension) override;
-  NS_IMETHODIMP GetFilterIndex(int32_t *aFilterIndex) override;
-  NS_IMETHODIMP SetFilterIndex(int32_t aFilterIndex) override;
-  NS_IMETHODIMP GetFile(nsIFile **aFile) override;
-  NS_IMETHODIMP GetFileURL(nsIURI **aFileURL) override;
-  NS_IMETHODIMP GetFiles(nsISimpleEnumerator **aFiles) override;
-  NS_IMETHODIMP Show(int16_t *aReturn) override;
+  NS_IMETHOD AppendFilters(int32_t aFilterMask) override;
+  NS_IMETHOD AppendFilter(const nsAString& aTitle,
+                          const nsAString& aFilter) override;
+  NS_IMETHOD SetDefaultString(const nsAString& aString) override;
+  NS_IMETHOD GetDefaultString(nsAString& aString) override;
+  NS_IMETHOD SetDefaultExtension(const nsAString& aExtension) override;
+  NS_IMETHOD GetDefaultExtension(nsAString& aExtension) override;
+  NS_IMETHOD GetFilterIndex(int32_t *aFilterIndex) override;
+  NS_IMETHOD SetFilterIndex(int32_t aFilterIndex) override;
+  NS_IMETHOD GetFile(nsIFile **aFile) override;
+  NS_IMETHOD GetFileURL(nsIURI **aFileURL) override;
+  NS_IMETHOD GetFiles(nsISimpleEnumerator **aFiles) override;
+  NS_IMETHOD Show(int16_t *aReturn) override;
 
   // nsBaseFilePicker
   virtual void InitNative(nsIWidget *aParent,
                           const nsAString& aTitle) override;
 
   static void Shutdown();
 
 protected:
--- a/widget/gtk/nsPrintDialogGTK.h
+++ b/widget/gtk/nsPrintDialogGTK.h
@@ -24,16 +24,16 @@ class nsPrintDialogServiceGTK : public n
 {
   virtual ~nsPrintDialogServiceGTK();
 
 public:
   nsPrintDialogServiceGTK();
 
   NS_DECL_ISUPPORTS
 
-  NS_IMETHODIMP Init() override;
-  NS_IMETHODIMP Show(nsPIDOMWindowOuter *aParent, nsIPrintSettings *aSettings,
-                     nsIWebBrowserPrint *aWebBrowserPrint) override;
-  NS_IMETHODIMP ShowPageSetup(nsPIDOMWindowOuter *aParent,
-                              nsIPrintSettings *aSettings) override;
+  NS_IMETHOD Init() override;
+  NS_IMETHOD Show(nsPIDOMWindowOuter *aParent, nsIPrintSettings *aSettings,
+                  nsIWebBrowserPrint *aWebBrowserPrint) override;
+  NS_IMETHOD ShowPageSetup(nsPIDOMWindowOuter *aParent,
+                           nsIPrintSettings *aSettings) override;
 };
 
 #endif
--- a/widget/nsFilePickerProxy.h
+++ b/widget/nsFilePickerProxy.h
@@ -29,33 +29,33 @@ class nsFilePickerProxy : public nsBaseF
                           public mozilla::dom::PFilePickerChild
 {
 public:
     nsFilePickerProxy();
 
     NS_DECL_ISUPPORTS
 
     // nsIFilePicker (less what's in nsBaseFilePicker)
-    NS_IMETHODIMP Init(mozIDOMWindowProxy* aParent, const nsAString& aTitle, int16_t aMode) override;
-    NS_IMETHODIMP AppendFilter(const nsAString& aTitle, const nsAString& aFilter) override;
-    NS_IMETHODIMP GetDefaultString(nsAString& aDefaultString) override;
-    NS_IMETHODIMP SetDefaultString(const nsAString& aDefaultString) override;
-    NS_IMETHODIMP GetDefaultExtension(nsAString& aDefaultExtension) override;
-    NS_IMETHODIMP SetDefaultExtension(const nsAString& aDefaultExtension) override;
-    NS_IMETHODIMP GetFilterIndex(int32_t* aFilterIndex) override;
-    NS_IMETHODIMP SetFilterIndex(int32_t aFilterIndex) override;
-    NS_IMETHODIMP GetFile(nsIFile** aFile) override;
-    NS_IMETHODIMP GetFileURL(nsIURI** aFileURL) override;
-    NS_IMETHODIMP GetFiles(nsISimpleEnumerator** aFiles) override;
+    NS_IMETHOD Init(mozIDOMWindowProxy* aParent, const nsAString& aTitle, int16_t aMode) override;
+    NS_IMETHOD AppendFilter(const nsAString& aTitle, const nsAString& aFilter) override;
+    NS_IMETHOD GetDefaultString(nsAString& aDefaultString) override;
+    NS_IMETHOD SetDefaultString(const nsAString& aDefaultString) override;
+    NS_IMETHOD GetDefaultExtension(nsAString& aDefaultExtension) override;
+    NS_IMETHOD SetDefaultExtension(const nsAString& aDefaultExtension) override;
+    NS_IMETHOD GetFilterIndex(int32_t* aFilterIndex) override;
+    NS_IMETHOD SetFilterIndex(int32_t aFilterIndex) override;
+    NS_IMETHOD GetFile(nsIFile** aFile) override;
+    NS_IMETHOD GetFileURL(nsIURI** aFileURL) override;
+    NS_IMETHOD GetFiles(nsISimpleEnumerator** aFiles) override;
 
-    NS_IMETHODIMP GetDomFileOrDirectory(nsISupports** aValue) override;
-    NS_IMETHODIMP GetDomFileOrDirectoryEnumerator(nsISimpleEnumerator** aValue) override;
+    NS_IMETHOD GetDomFileOrDirectory(nsISupports** aValue) override;
+    NS_IMETHOD GetDomFileOrDirectoryEnumerator(nsISimpleEnumerator** aValue) override;
 
-    NS_IMETHODIMP Show(int16_t* aReturn) override;
-    NS_IMETHODIMP Open(nsIFilePickerShownCallback* aCallback) override;
+    NS_IMETHOD Show(int16_t* aReturn) override;
+    NS_IMETHOD Open(nsIFilePickerShownCallback* aCallback) override;
 
     // PFilePickerChild
     virtual bool
     Recv__delete__(const MaybeInputData& aData, const int16_t& aResult) override;
 
 private:
     ~nsFilePickerProxy();
     void InitNative(nsIWidget*, const nsAString&) override;
--- a/widget/windows/nsAppShell.cpp
+++ b/widget/windows/nsAppShell.cpp
@@ -40,17 +40,17 @@ PRLogModuleInfo* GetWinWakeLockLog() {
 // A wake lock listener that disables screen saver when requested by
 // Gecko. For example when we're playing video in a foreground tab we
 // don't want the screen saver to turn on.
 class WinWakeLockListener final : public nsIDOMMozWakeLockListener
                                 , public nsITimerCallback {
 public:
   NS_DECL_ISUPPORTS;
 
-  NS_IMETHODIMP Notify(nsITimer *timer) override {
+  NS_IMETHOD Notify(nsITimer *timer) override {
     WAKE_LOCK_LOG("WinWakeLock: periodic timer fired");
     ResetScreenSaverTimeout();
     return NS_OK;
   }
 private:
   ~WinWakeLockListener() {}
 
   NS_IMETHOD Callback(const nsAString& aTopic, const nsAString& aState) {
--- a/xpcom/base/CountingAllocatorBase.h
+++ b/xpcom/base/CountingAllocatorBase.h
@@ -16,19 +16,19 @@ namespace mozilla {
 // This CRTP class handles several details of wrapping allocators and should
 // be preferred to manually counting with MOZ_DEFINE_MALLOC_SIZE_OF_ON_ALLOC
 // and MOZ_DEFINE_MALLOC_SIZE_OF_ON_FREE.  The typical use is in a memory
 // reporter for a particular third party library:
 //
 //   class MyMemoryReporter : public CountingAllocatorBase<MyMemoryReporter>
 //   {
 //     ...
-//     NS_IMETHODIMP
+//     NS_IMETHOD
 //     CollectReports(nsIHandleReportCallback* aHandleReport,
-//                    nsISupports* aData, bool aAnonymize)
+//                    nsISupports* aData, bool aAnonymize) override
 //     {
 //        return MOZ_COLLECT_REPORT(
 //          "explicit/path/to/somewhere", KIND_HEAP, UNITS_BYTES,
 //          MemoryAllocated(),
 //          "A description of what we are reporting."
 //     }
 //   };
 //
--- a/xpcom/base/nsMemoryInfoDumper.cpp
+++ b/xpcom/base/nsMemoryInfoDumper.cpp
@@ -328,22 +328,22 @@ class nsDumpGCAndCCLogsCallbackHolder fi
 public:
   NS_DECL_ISUPPORTS
 
   explicit nsDumpGCAndCCLogsCallbackHolder(nsIDumpGCAndCCLogsCallback* aCallback)
     : mCallback(aCallback)
   {
   }
 
-  NS_IMETHODIMP OnFinish() override
+  NS_IMETHOD OnFinish() override
   {
     return NS_ERROR_UNEXPECTED;
   }
 
-  NS_IMETHODIMP OnDump(nsIFile* aGCLog, nsIFile* aCCLog, bool aIsParent) override
+  NS_IMETHOD OnDump(nsIFile* aGCLog, nsIFile* aCCLog, bool aIsParent) override
   {
     return mCallback->OnDump(aGCLog, aCCLog, aIsParent);
   }
 
 private:
   ~nsDumpGCAndCCLogsCallbackHolder()
   {
     Unused << mCallback->OnFinish();
--- a/xpcom/build/XPCOMInit.cpp
+++ b/xpcom/build/XPCOMInit.cpp
@@ -366,17 +366,17 @@ public:
   }
 
   static void Free(const void*, void* aPtr)
   {
     return CountingFree(aPtr);
   }
 
 private:
-  NS_IMETHODIMP
+  NS_IMETHOD
   CollectReports(nsIHandleReportCallback* aHandleReport, nsISupports* aData,
                  bool aAnonymize) override
   {
     return MOZ_COLLECT_REPORT(
       "explicit/icu", KIND_HEAP, UNITS_BYTES, MemoryAllocated(),
       "Memory used by ICU, a Unicode and globalization support library.");
   }
 
@@ -391,17 +391,17 @@ CountingAllocatorBase<ICUReporter>::sAmo
 class OggReporter final
   : public nsIMemoryReporter
   , public CountingAllocatorBase<OggReporter>
 {
 public:
   NS_DECL_ISUPPORTS
 
 private:
-  NS_IMETHODIMP
+  NS_IMETHOD
   CollectReports(nsIHandleReportCallback* aHandleReport, nsISupports* aData,
                  bool aAnonymize) override
   {
     return MOZ_COLLECT_REPORT(
       "explicit/media/libogg", KIND_HEAP, UNITS_BYTES, MemoryAllocated(),
       "Memory allocated through libogg for Ogg, Theora, and related media files.");
   }
 
@@ -417,17 +417,17 @@ CountingAllocatorBase<OggReporter>::sAmo
 class VPXReporter final
   : public nsIMemoryReporter
   , public CountingAllocatorBase<VPXReporter>
 {
 public:
   NS_DECL_ISUPPORTS
 
 private:
-  NS_IMETHODIMP
+  NS_IMETHOD
   CollectReports(nsIHandleReportCallback* aHandleReport, nsISupports* aData,
                  bool aAnonymize) override
   {
     return MOZ_COLLECT_REPORT(
       "explicit/media/libvpx", KIND_HEAP, UNITS_BYTES, MemoryAllocated(),
       "Memory allocated through libvpx for WebM media files.");
   }
 
@@ -444,17 +444,17 @@ CountingAllocatorBase<VPXReporter>::sAmo
 class NesteggReporter final
   : public nsIMemoryReporter
   , public CountingAllocatorBase<NesteggReporter>
 {
 public:
   NS_DECL_ISUPPORTS
 
 private:
-  NS_IMETHODIMP
+  NS_IMETHOD
   CollectReports(nsIHandleReportCallback* aHandleReport, nsISupports* aData,
                  bool aAnonymize) override
   {
     return MOZ_COLLECT_REPORT(
       "explicit/media/libnestegg", KIND_HEAP, UNITS_BYTES, MemoryAllocated(),
       "Memory allocated through libnestegg for WebM media files.");
   }
 
--- a/xpcom/tests/TestHarness.h
+++ b/xpcom/tests/TestHarness.h
@@ -215,18 +215,18 @@ class ScopedXPCOM : public nsIDirectoryS
 
       nsCOMPtr<nsIFile> copy = mGREBinD;
       return copy.forget();
     }
 
     ////////////////////////////////////////////////////////////////////////////
     //// nsIDirectoryServiceProvider
 
-    NS_IMETHODIMP GetFile(const char *aProperty, bool *_persistent,
-                          nsIFile **_result) override
+    NS_IMETHOD GetFile(const char *aProperty, bool *_persistent,
+                       nsIFile **_result) override
     {
       // If we were supplied a directory service provider, ask it first.
       if (mDirSvcProvider &&
           NS_SUCCEEDED(mDirSvcProvider->GetFile(aProperty, _persistent,
                                                 _result))) {
         return NS_OK;
       }
 
@@ -261,17 +261,17 @@ class ScopedXPCOM : public nsIDirectoryS
       }
 
       return NS_ERROR_FAILURE;
     }
 
     ////////////////////////////////////////////////////////////////////////////
     //// nsIDirectoryServiceProvider2
 
-    NS_IMETHODIMP GetFiles(const char *aProperty, nsISimpleEnumerator **_enum) override
+    NS_IMETHOD GetFiles(const char *aProperty, nsISimpleEnumerator **_enum) override
     {
       // If we were supplied a directory service provider, ask it first.
       nsCOMPtr<nsIDirectoryServiceProvider2> provider =
         do_QueryInterface(mDirSvcProvider);
       if (provider && NS_SUCCEEDED(provider->GetFiles(aProperty, _enum))) {
         return NS_OK;
       }