Bug 1038207 - Fix various classes that reimplement nsISupports. r=ehsan
authorAndrew McCreight <continuation@gmail.com>
Mon, 14 Jul 2014 12:21:34 -0700
changeset 215853 6a60d23f9bfd6c141470933b79596109f4a44a59
parent 215852 692a0f99d09db45f9dda2e9d1a4378e1b79facf3
child 215854 2c8433065a33930f7f52c66adc9867fdab84c1e8
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1038207
milestone33.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 1038207 - Fix various classes that reimplement nsISupports. r=ehsan
content/base/src/nsDocument.cpp
content/canvas/src/ImageEncoder.cpp
content/media/MediaDecoderStateMachineScheduler.cpp
dom/events/FocusEvent.h
dom/src/notification/DesktopNotification.cpp
gfx/thebes/gfxFontInfoLoader.cpp
image/src/ClippedImage.cpp
image/src/ClippedImage.h
image/src/FrozenImage.cpp
image/src/FrozenImage.h
image/src/OrientedImage.cpp
image/src/OrientedImage.h
intl/lwbrk/src/nsSemanticUnitScanner.cpp
intl/lwbrk/src/nsSemanticUnitScanner.h
js/xpconnect/src/xpcprivate.h
layout/printing/nsPagePrintTimer.h
layout/svg/nsSVGEffects.h
modules/libjar/nsJARChannel.h
netwerk/cache/nsCacheEntryDescriptor.h
netwerk/protocol/app/AppProtocolHandler.cpp
storage/test/test_AsXXX_helpers.cpp
toolkit/components/places/Helpers.cpp
toolkit/components/places/Helpers.h
uriloader/exthandler/ExternalHelperAppParent.h
widget/cocoa/nsStandaloneNativeMenu.h
widget/cocoa/nsStandaloneNativeMenu.mm
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -11334,17 +11334,17 @@ class nsPointerLockPermissionRequest : p
                                        public nsIContentPermissionRequest
 {
 public:
   nsPointerLockPermissionRequest(Element* aElement, bool aUserInputOrChromeCaller)
   : mElement(do_GetWeakReference(aElement)),
     mDocument(do_GetWeakReference(aElement->OwnerDoc())),
     mUserInputOrChromeCaller(aUserInputOrChromeCaller) {}
 
-  NS_DECL_ISUPPORTS
+  NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSICONTENTPERMISSIONREQUEST
 
   NS_IMETHOD Run()
   {
     nsCOMPtr<Element> e = do_QueryReferent(mElement);
     nsCOMPtr<nsIDocument> d = do_QueryReferent(mDocument);
     if (!e || !d || gPendingPointerLockRequest != this ||
         e->GetCurrentDoc() != d) {
--- a/content/canvas/src/ImageEncoder.cpp
+++ b/content/canvas/src/ImageEncoder.cpp
@@ -14,17 +14,17 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 class EncodingCompleteEvent : public nsRunnable
 {
   virtual ~EncodingCompleteEvent() {}
 
 public:
-  NS_DECL_THREADSAFE_ISUPPORTS
+  NS_DECL_ISUPPORTS_INHERITED
 
   EncodingCompleteEvent(nsIGlobalObject* aGlobal,
                         nsIThread* aEncoderThread,
                         FileCallback& aCallback)
     : mImgSize(0)
     , mType()
     , mImgData(nullptr)
     , mGlobal(aGlobal)
@@ -80,24 +80,24 @@ private:
   nsAutoString mType;
   void* mImgData;
   nsCOMPtr<nsIGlobalObject> mGlobal;
   nsCOMPtr<nsIThread> mEncoderThread;
   nsRefPtr<FileCallback> mCallback;
   bool mFailed;
 };
 
-NS_IMPL_ISUPPORTS(EncodingCompleteEvent, nsIRunnable);
+NS_IMPL_ISUPPORTS_INHERITED0(EncodingCompleteEvent, nsRunnable);
 
 class EncodingRunnable : public nsRunnable
 {
   virtual ~EncodingRunnable() {}
 
 public:
-  NS_DECL_THREADSAFE_ISUPPORTS
+  NS_DECL_ISUPPORTS_INHERITED
 
   EncodingRunnable(const nsAString& aType,
                    const nsAString& aOptions,
                    uint8_t* aImageBuffer,
                    imgIEncoder* aEncoder,
                    EncodingCompleteEvent* aEncodingCompleteEvent,
                    int32_t aFormat,
                    const nsIntSize aSize,
@@ -175,17 +175,17 @@ private:
   nsAutoArrayPtr<uint8_t> mImageBuffer;
   nsCOMPtr<imgIEncoder> mEncoder;
   nsRefPtr<EncodingCompleteEvent> mEncodingCompleteEvent;
   int32_t mFormat;
   const nsIntSize mSize;
   bool mUsingCustomOptions;
 };
 
-NS_IMPL_ISUPPORTS(EncodingRunnable, nsIRunnable)
+NS_IMPL_ISUPPORTS_INHERITED0(EncodingRunnable, nsRunnable);
 
 /* static */
 nsresult
 ImageEncoder::ExtractData(nsAString& aType,
                           const nsAString& aOptions,
                           const nsIntSize aSize,
                           nsICanvasRenderingContextInternal* aContext,
                           nsIInputStream** aStream)
--- a/content/media/MediaDecoderStateMachineScheduler.cpp
+++ b/content/media/MediaDecoderStateMachineScheduler.cpp
@@ -9,17 +9,17 @@
 #include "mozilla/ReentrantMonitor.h"
 #include "nsITimer.h"
 #include "nsComponentManagerUtils.h"
 #include "VideoUtils.h"
 
 namespace {
 class TimerEvent : public nsITimerCallback, public nsRunnable {
   typedef mozilla::MediaDecoderStateMachineScheduler Scheduler;
-  NS_DECL_THREADSAFE_ISUPPORTS
+  NS_DECL_ISUPPORTS_INHERITED
 public:
   TimerEvent(Scheduler* aScheduler, int aTimerId)
     : mScheduler(aScheduler), mTimerId(aTimerId) {}
 
   NS_IMETHOD Run() MOZ_OVERRIDE {
     return mScheduler->TimeoutExpired(mTimerId);
   }
 
@@ -27,17 +27,17 @@ public:
     return mScheduler->TimeoutExpired(mTimerId);
   }
 private:
   ~TimerEvent() {}
   Scheduler* const mScheduler;
   const int mTimerId;
 };
 
-NS_IMPL_ISUPPORTS(TimerEvent, nsITimerCallback, nsIRunnable);
+NS_IMPL_ISUPPORTS_INHERITED(TimerEvent, nsRunnable, nsITimerCallback);
 } // anonymous namespace
 
 static already_AddRefed<nsIEventTarget>
 CreateStateMachineThread()
 {
   using mozilla::SharedThreadPool;
   using mozilla::RefPtr;
   RefPtr<SharedThreadPool> threadPool(
--- a/dom/events/FocusEvent.h
+++ b/dom/events/FocusEvent.h
@@ -12,17 +12,17 @@
 
 namespace mozilla {
 namespace dom {
 
 class FocusEvent : public UIEvent,
                    public nsIDOMFocusEvent
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIDOMFOCUSEVENT
 
   // Forward to base class
   NS_FORWARD_TO_UIEVENT
 
   virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
   {
     return FocusEventBinding::Wrap(aCx, this);
--- a/dom/src/notification/DesktopNotification.cpp
+++ b/dom/src/notification/DesktopNotification.cpp
@@ -29,17 +29,17 @@ class DesktopNotificationRequest : publi
                                    public PCOMContentPermissionRequestChild
 
 {
   ~DesktopNotificationRequest()
   {
   }
 
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSICONTENTPERMISSIONREQUEST
 
   DesktopNotificationRequest(DesktopNotification* notification)
     : mDesktopNotification(notification) {}
 
   NS_IMETHOD Run() MOZ_OVERRIDE
   {
     nsCOMPtr<nsIContentPermissionPrompt> prompt =
@@ -304,19 +304,18 @@ DesktopNotificationCenter::WrapObject(JS
 {
   return DesktopNotificationCenterBinding::Wrap(aCx, this);
 }
 
 /* ------------------------------------------------------------------------ */
 /* DesktopNotificationRequest                                               */
 /* ------------------------------------------------------------------------ */
 
-NS_IMPL_ISUPPORTS(DesktopNotificationRequest,
-                  nsIContentPermissionRequest,
-                  nsIRunnable)
+NS_IMPL_ISUPPORTS_INHERITED(DesktopNotificationRequest, nsRunnable,
+			    nsIContentPermissionRequest)
 
 NS_IMETHODIMP
 DesktopNotificationRequest::GetPrincipal(nsIPrincipal * *aRequestingPrincipal)
 {
   if (!mDesktopNotification) {
     return NS_ERROR_NOT_INITIALIZED;
   }
 
--- a/gfx/thebes/gfxFontInfoLoader.cpp
+++ b/gfx/thebes/gfxFontInfoLoader.cpp
@@ -24,31 +24,31 @@ FontInfoData::Load()
     }
 
     mLoadTime = TimeStamp::Now() - start;
 }
 
 class FontInfoLoadCompleteEvent : public nsRunnable {
     virtual ~FontInfoLoadCompleteEvent() {}
 
-    NS_DECL_THREADSAFE_ISUPPORTS
+    NS_DECL_ISUPPORTS_INHERITED
 
     FontInfoLoadCompleteEvent(FontInfoData *aFontInfo) :
         mFontInfo(aFontInfo)
     {}
 
     NS_IMETHOD Run();
 
     nsRefPtr<FontInfoData> mFontInfo;
 };
 
 class AsyncFontInfoLoader : public nsRunnable {
     virtual ~AsyncFontInfoLoader() {}
 
-    NS_DECL_THREADSAFE_ISUPPORTS
+    NS_DECL_ISUPPORTS_INHERITED
 
     AsyncFontInfoLoader(FontInfoData *aFontInfo) :
         mFontInfo(aFontInfo)
     {
         mCompleteEvent = new FontInfoLoadCompleteEvent(aFontInfo);
     }
 
     NS_IMETHOD Run();
@@ -65,33 +65,33 @@ FontInfoLoadCompleteEvent::Run()
         static_cast<gfxFontInfoLoader*>(gfxPlatformFontList::PlatformFontList());
 
     loader->FinalizeLoader(mFontInfo);
 
     mFontInfo = nullptr;
     return NS_OK;
 }
 
-NS_IMPL_ISUPPORTS(FontInfoLoadCompleteEvent, nsIRunnable);
+NS_IMPL_ISUPPORTS_INHERITED0(FontInfoLoadCompleteEvent, nsRunnable);
 
 // runs on separate thread
 nsresult
 AsyncFontInfoLoader::Run()
 {
     // load platform-specific font info
     mFontInfo->Load();
 
     // post a completion event that transfer the data to the fontlist
     NS_DispatchToMainThread(mCompleteEvent);
     mFontInfo = nullptr;
 
     return NS_OK;
 }
 
-NS_IMPL_ISUPPORTS(AsyncFontInfoLoader, nsIRunnable);
+NS_IMPL_ISUPPORTS_INHERITED0(AsyncFontInfoLoader, nsRunnable);
 
 NS_IMPL_ISUPPORTS(gfxFontInfoLoader::ShutdownObserver, nsIObserver)
 
 NS_IMETHODIMP
 gfxFontInfoLoader::ShutdownObserver::Observe(nsISupports *aSubject,
                                              const char *aTopic,
                                              const char16_t *someData)
 {
--- a/image/src/ClippedImage.cpp
+++ b/image/src/ClippedImage.cpp
@@ -151,17 +151,17 @@ ClippedImage::ShouldClip()
       mShouldClip.construct(false);
     }
   }
 
   MOZ_ASSERT(!mShouldClip.empty(), "Should have computed a result");
   return mShouldClip.ref();
 }
 
-NS_IMPL_ISUPPORTS(ClippedImage, imgIContainer)
+NS_IMPL_ISUPPORTS_INHERITED0(ClippedImage, ImageWrapper)
 
 nsIntRect
 ClippedImage::FrameRect(uint32_t aWhichFrame)
 {
   if (!ShouldClip()) {
     return InnerImage()->FrameRect(aWhichFrame);
   }
 
--- a/image/src/ClippedImage.h
+++ b/image/src/ClippedImage.h
@@ -24,17 +24,17 @@ class DrawSingleTileCallback;
  * XXX(seth): There a known (performance, not correctness) issue with
  * GetImageContainer. See the comments for that method for more information.
  */
 class ClippedImage : public ImageWrapper
 {
   typedef mozilla::gfx::SourceSurface SourceSurface;
 
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_ISUPPORTS_INHERITED
 
   virtual nsIntRect FrameRect(uint32_t aWhichFrame) MOZ_OVERRIDE;
 
   NS_IMETHOD GetWidth(int32_t* aWidth) MOZ_OVERRIDE;
   NS_IMETHOD GetHeight(int32_t* aHeight) MOZ_OVERRIDE;
   NS_IMETHOD GetIntrinsicSize(nsSize* aSize) MOZ_OVERRIDE;
   NS_IMETHOD GetIntrinsicRatio(nsSize* aRatio) MOZ_OVERRIDE;
   NS_IMETHOD_(mozilla::TemporaryRef<SourceSurface>)
--- a/image/src/FrozenImage.cpp
+++ b/image/src/FrozenImage.cpp
@@ -5,17 +5,17 @@
 
 #include "FrozenImage.h"
 
 using namespace mozilla::gfx;
 
 namespace mozilla {
 namespace image {
 
-NS_IMPL_ISUPPORTS(FrozenImage, imgIContainer)
+NS_IMPL_ISUPPORTS_INHERITED0(FrozenImage, ImageWrapper)
 
 nsIntRect
 FrozenImage::FrameRect(uint32_t /* aWhichFrame - ignored */)
 {
   return InnerImage()->FrameRect(FRAME_FIRST);
 }
 
 void
--- a/image/src/FrozenImage.h
+++ b/image/src/FrozenImage.h
@@ -24,17 +24,17 @@ namespace image {
  * XXX(seth): There a known (performance, not correctness) issue with
  * GetImageContainer. See the comments for that method for more information.
  */
 class FrozenImage : public ImageWrapper
 {
   typedef mozilla::gfx::SourceSurface SourceSurface;
 
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_ISUPPORTS_INHERITED
 
   virtual nsIntRect FrameRect(uint32_t aWhichFrame) MOZ_OVERRIDE;
   virtual void IncrementAnimationConsumers() MOZ_OVERRIDE;
   virtual void DecrementAnimationConsumers() MOZ_OVERRIDE;
 
   NS_IMETHOD GetAnimated(bool* aAnimated) MOZ_OVERRIDE;
   NS_IMETHOD_(TemporaryRef<SourceSurface>)
     GetFrame(uint32_t aWhichFrame, uint32_t aFlags) MOZ_OVERRIDE;
--- a/image/src/OrientedImage.cpp
+++ b/image/src/OrientedImage.cpp
@@ -15,17 +15,17 @@ using namespace mozilla::gfx;
 
 using std::swap;
 using mozilla::layers::LayerManager;
 using mozilla::layers::ImageContainer;
 
 namespace mozilla {
 namespace image {
 
-NS_IMPL_ISUPPORTS(OrientedImage, imgIContainer)
+NS_IMPL_ISUPPORTS_INHERITED0(OrientedImage, ImageWrapper)
 
 nsIntRect
 OrientedImage::FrameRect(uint32_t aWhichFrame)
 {
   if (mOrientation.SwapsWidthAndHeight()) {
     nsIntRect innerRect = InnerImage()->FrameRect(aWhichFrame);
     return nsIntRect(innerRect.x, innerRect.y, innerRect.height, innerRect.width);
   } else {
--- a/image/src/OrientedImage.h
+++ b/image/src/OrientedImage.h
@@ -21,17 +21,17 @@ namespace image {
  * XXX(seth): There a known (performance, not correctness) issue with
  * GetImageContainer. See the comments for that method for more information.
  */
 class OrientedImage : public ImageWrapper
 {
   typedef mozilla::gfx::SourceSurface SourceSurface;
 
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_ISUPPORTS_INHERITED
 
   virtual nsIntRect FrameRect(uint32_t aWhichFrame) MOZ_OVERRIDE;
 
   NS_IMETHOD GetWidth(int32_t* aWidth) MOZ_OVERRIDE;
   NS_IMETHOD GetHeight(int32_t* aHeight) MOZ_OVERRIDE;
   NS_IMETHOD GetIntrinsicSize(nsSize* aSize) MOZ_OVERRIDE;
   NS_IMETHOD GetIntrinsicRatio(nsSize* aRatio) MOZ_OVERRIDE;
   NS_IMETHOD_(mozilla::TemporaryRef<SourceSurface>)
--- a/intl/lwbrk/src/nsSemanticUnitScanner.cpp
+++ b/intl/lwbrk/src/nsSemanticUnitScanner.cpp
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsSemanticUnitScanner.h"
 
-NS_IMPL_ISUPPORTS(nsSemanticUnitScanner, nsISemanticUnitScanner)
+NS_IMPL_ISUPPORTS_INHERITED(nsSemanticUnitScanner, nsSampleWordBreaker, nsISemanticUnitScanner)
 
 nsSemanticUnitScanner::nsSemanticUnitScanner() : nsSampleWordBreaker()
 {
   /* member initializers and constructor code */
 }
 
 nsSemanticUnitScanner::~nsSemanticUnitScanner()
 {
--- a/intl/lwbrk/src/nsSemanticUnitScanner.h
+++ b/intl/lwbrk/src/nsSemanticUnitScanner.h
@@ -9,17 +9,17 @@
 #include "nsSampleWordBreaker.h"
 #include "nsISemanticUnitScanner.h"
 
 
 class nsSemanticUnitScanner : public nsISemanticUnitScanner
                             , public nsSampleWordBreaker
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSISEMANTICUNITSCANNER
 
   nsSemanticUnitScanner();
 
 private:
   virtual ~nsSemanticUnitScanner();
   /* additional members */
 };
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -2850,17 +2850,17 @@ protected:
 
     friend class XPCWrappedNativeScope;
 };
 
 class nsXPCComponents : public nsXPCComponentsBase,
                         public nsIXPCComponents
 {
 public:
-    NS_DECL_ISUPPORTS
+    NS_DECL_ISUPPORTS_INHERITED
     NS_FORWARD_NSIXPCCOMPONENTSBASE(nsXPCComponentsBase::)
     NS_DECL_NSIXPCCOMPONENTS
 
 protected:
     nsXPCComponents(XPCWrappedNativeScope* aScope);
     virtual ~nsXPCComponents();
     virtual void ClearMembers() MOZ_OVERRIDE;
 
--- a/layout/printing/nsPagePrintTimer.h
+++ b/layout/printing/nsPagePrintTimer.h
@@ -18,17 +18,17 @@ class nsPrintEngine;
 //---------------------------------------------------
 //-- Page Timer Class
 //---------------------------------------------------
 class nsPagePrintTimer MOZ_FINAL : public nsRunnable,
                                    public nsITimerCallback
 {
 public:
 
-  NS_DECL_ISUPPORTS
+  NS_DECL_ISUPPORTS_INHERITED
 
   nsPagePrintTimer(nsPrintEngine* aPrintEngine,
                    nsIDocumentViewerPrint* aDocViewerPrint,
                    uint32_t aDelay)
     : mPrintEngine(aPrintEngine)
     , mDocViewerPrint(aDocViewerPrint)
     , mDelay(aDelay)
     , mFiringCount(0)
--- a/layout/svg/nsSVGEffects.h
+++ b/layout/svg/nsSVGEffects.h
@@ -173,17 +173,17 @@ public:
   bool ReferencesValidResource() { return GetFilterFrame(); }
 
   /**
    * @return the filter frame, or null if there is no filter frame
    */
   nsSVGFilterFrame *GetFilterFrame();
 
   // nsISupports
-  NS_DECL_ISUPPORTS
+  NS_DECL_ISUPPORTS_INHERITED
 
   // nsISVGFilterReference
   virtual void Invalidate() MOZ_OVERRIDE { DoUpdate(); };
 
 protected:
   virtual ~nsSVGFilterReference() {}
 
 private:
--- a/modules/libjar/nsJARChannel.h
+++ b/modules/libjar/nsJARChannel.h
@@ -34,17 +34,17 @@ class nsJARChannel : public nsIJARChanne
                    , public nsIDownloadObserver
                    , public nsIStreamListener
                    , public nsIRemoteOpenFileListener
                    , public nsIThreadRetargetableRequest
                    , public nsIThreadRetargetableStreamListener
                    , public nsHashPropertyBag
 {
 public:
-    NS_DECL_THREADSAFE_ISUPPORTS
+    NS_DECL_ISUPPORTS_INHERITED
     NS_DECL_NSIREQUEST
     NS_DECL_NSICHANNEL
     NS_DECL_NSIJARCHANNEL
     NS_DECL_NSIDOWNLOADOBSERVER
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSISTREAMLISTENER
     NS_DECL_NSIREMOTEOPENFILELISTENER
     NS_DECL_NSITHREADRETARGETABLEREQUEST
--- a/netwerk/cache/nsCacheEntryDescriptor.h
+++ b/netwerk/cache/nsCacheEntryDescriptor.h
@@ -112,17 +112,17 @@ private:
      class nsDecompressInputStreamWrapper : public nsInputStreamWrapper {
      private:
          unsigned char* mReadBuffer;
          uint32_t mReadBufferLen;
          z_stream mZstream;
          bool mStreamInitialized;
          bool mStreamEnded;
      public:
-         NS_DECL_THREADSAFE_ISUPPORTS
+         NS_DECL_ISUPPORTS_INHERITED
 
          nsDecompressInputStreamWrapper(nsCacheEntryDescriptor * desc,
                                       uint32_t off)
           : nsInputStreamWrapper(desc, off)
           , mReadBuffer(0)
           , mReadBufferLen(0)
           , mStreamInitialized(false)
           , mStreamEnded(false)
@@ -192,17 +192,17 @@ private:
      private:
          unsigned char* mWriteBuffer;
          uint32_t mWriteBufferLen;
          z_stream mZstream;
          bool mStreamInitialized;
          bool mStreamEnded;
          uint32_t mUncompressedCount;
      public:
-         NS_DECL_THREADSAFE_ISUPPORTS
+         NS_DECL_ISUPPORTS_INHERITED
 
          nsCompressOutputStreamWrapper(nsCacheEntryDescriptor * desc, 
                                        uint32_t off)
           : nsOutputStreamWrapper(desc, off)
           , mWriteBuffer(0)
           , mWriteBufferLen(0)
           , mStreamInitialized(false)
           , mStreamEnded(false)
--- a/netwerk/protocol/app/AppProtocolHandler.cpp
+++ b/netwerk/protocol/app/AppProtocolHandler.cpp
@@ -17,17 +17,17 @@
   * This dummy channel implementation only provides enough functionality
   * to return a fake 404 error when the caller asks for an app:// URL
   * containing an unknown appId.
   */
 class DummyChannel : public nsIJARChannel
                           , nsRunnable
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIREQUEST
   NS_DECL_NSICHANNEL
   NS_DECL_NSIJARCHANNEL
 
   DummyChannel();
 
   NS_IMETHODIMP Run();
 
@@ -38,17 +38,17 @@ private:
   uint32_t                    mSuspendCount;
   nsCOMPtr<nsISupports>       mListenerContext;
   nsCOMPtr<nsIStreamListener> mListener;
   nsCOMPtr<nsILoadGroup>      mLoadGroup;
   nsLoadFlags                 mLoadFlags;
   nsCOMPtr<nsILoadInfo>       mLoadInfo;
 };
 
-NS_IMPL_ISUPPORTS(DummyChannel, nsIRequest, nsIChannel, nsIJARChannel)
+NS_IMPL_ISUPPORTS_INHERITED(DummyChannel, nsRunnable, nsIRequest, nsIChannel, nsIJARChannel)
 
 DummyChannel::DummyChannel() : mPending(false)
                              , mSuspendCount(0)
                              , mLoadFlags(LOAD_NORMAL)
 {
 }
 
 NS_IMETHODIMP DummyChannel::GetName(nsACString &result)
--- a/storage/test/test_AsXXX_helpers.cpp
+++ b/storage/test/test_AsXXX_helpers.cpp
@@ -12,17 +12,17 @@
  */
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Event Loop Spinning
 
 class Spinner : public AsyncStatementSpinner
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_ASYNCSTATEMENTSPINNER
   Spinner() {}
 protected:
   virtual ~Spinner() {}
 };
 
 NS_IMPL_ISUPPORTS_INHERITED0(Spinner,
                              AsyncStatementSpinner)
--- a/toolkit/components/places/Helpers.cpp
+++ b/toolkit/components/places/Helpers.cpp
@@ -365,19 +365,19 @@ PlacesEvent::Notify()
 {
   NS_ASSERTION(NS_IsMainThread(), "Must only be used on the main thread!");
   nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
   if (obs) {
     (void)obs->NotifyObservers(nullptr, mTopic, nullptr);
   }
 }
 
-NS_IMPL_ISUPPORTS(
+NS_IMPL_ISUPPORTS_INHERITED0(
   PlacesEvent
-, nsIRunnable
+, nsRunnable
 )
 
 ////////////////////////////////////////////////////////////////////////////////
 //// AsyncStatementCallbackNotifier
 
 NS_IMETHODIMP
 AsyncStatementCallbackNotifier::HandleCompletion(uint16_t aReason)
 {
--- a/toolkit/components/places/Helpers.h
+++ b/toolkit/components/places/Helpers.h
@@ -211,17 +211,17 @@ bool GetHiddenState(bool aIsRedirect,
                     uint32_t aTransitionType);
 
 /**
  * Notifies a specified topic via the observer service.
  */
 class PlacesEvent : public nsRunnable
 {
 public:
-  NS_DECL_THREADSAFE_ISUPPORTS
+  NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIRUNNABLE
 
   PlacesEvent(const char* aTopic);
 protected:
   ~PlacesEvent() {}
   void Notify();
 
   const char* const mTopic;
--- a/uriloader/exthandler/ExternalHelperAppParent.h
+++ b/uriloader/exthandler/ExternalHelperAppParent.h
@@ -35,17 +35,17 @@ class ExternalHelperAppParent : public P
                               , public nsIChannel
                               , public nsIMultiPartChannel
                               , public nsIResumableChannel
                               , public nsIStreamListener
 {
     typedef mozilla::ipc::OptionalURIParams OptionalURIParams;
 
 public:
-    NS_DECL_ISUPPORTS
+    NS_DECL_ISUPPORTS_INHERITED
     NS_DECL_NSIREQUEST
     NS_DECL_NSICHANNEL
     NS_DECL_NSIMULTIPARTCHANNEL
     NS_DECL_NSIRESUMABLECHANNEL
     NS_DECL_NSISTREAMLISTENER
     NS_DECL_NSIREQUESTOBSERVER
 
     bool RecvOnStartRequest(const nsCString& entityID) MOZ_OVERRIDE;
--- a/widget/cocoa/nsStandaloneNativeMenu.h
+++ b/widget/cocoa/nsStandaloneNativeMenu.h
@@ -10,17 +10,17 @@
 #include "nsMenuX.h"
 #include "nsIStandaloneNativeMenu.h"
 
 class nsStandaloneNativeMenu : public nsMenuGroupOwnerX, public nsIStandaloneNativeMenu
 {
 public:
   nsStandaloneNativeMenu();
 
-  NS_DECL_ISUPPORTS  
+  NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSISTANDALONENATIVEMENU
 
   // nsMenuObjectX
   nsMenuObjectTypeX MenuObjectType() { return eStandaloneNativeMenuObjectType; }
   void * NativeData() { return mMenu != nullptr ? mMenu->NativeData() : nullptr; }
 
   nsMenuX * GetMenuXObject() { return mMenu; }
 
--- a/widget/cocoa/nsStandaloneNativeMenu.mm
+++ b/widget/cocoa/nsStandaloneNativeMenu.mm
@@ -8,17 +8,18 @@
 #include "nsStandaloneNativeMenu.h"
 #include "nsMenuUtilsX.h"
 #include "nsIDOMElement.h"
 #include "nsIMutationObserver.h"
 #include "nsGkAtoms.h"
 #include "nsObjCExceptions.h"
 
 
-NS_IMPL_ISUPPORTS(nsStandaloneNativeMenu, nsIMutationObserver, nsIStandaloneNativeMenu)
+NS_IMPL_ISUPPORTS_INHERITED(nsStandaloneNativeMenu, nsMenuGroupOwnerX,
+                            nsIMutationObserver, nsIStandaloneNativeMenu)
 
 nsStandaloneNativeMenu::nsStandaloneNativeMenu()
 : mMenu(nullptr)
 {
 }
 
 nsStandaloneNativeMenu::~nsStandaloneNativeMenu()
 {