Backed out 4 changesets (bug 1028588) for build bustage
authorWes Kocher <wkocher@mozilla.com>
Mon, 30 Jun 2014 15:50:19 -0700
changeset 191606 9b33a6d30532305c726e0fd8ff1415ae889e8367
parent 191605 13a8bae671ca9d52b34de3db0ea1e97d9937ef5b
child 191607 5428ca1aeeb619112e1c4acb64b631f2ecd2946b
push id27055
push usercbook@mozilla.com
push dateTue, 01 Jul 2014 12:01:46 +0000
treeherdermozilla-central@4a9353b5762d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1028588
milestone33.0a1
backs out13a8bae671ca9d52b34de3db0ea1e97d9937ef5b
19a19833f1d60e3bed4a16f31cd5ff2f92051bca
d5fae80054de26783e93ca9948cd358965a874b2
5942ad3859b831032a8afa0ac2e7d6d4deb0b5c7
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
Backed out 4 changesets (bug 1028588) for build bustage Backed out changeset 13a8bae671ca (bug 1028588) Backed out changeset 19a19833f1d6 (bug 1028588) Backed out changeset d5fae80054de (bug 1028588) Backed out changeset 5942ad3859b8 (bug 1028588)
embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
embedding/browser/webBrowser/nsDocShellTreeOwner.h
embedding/browser/webBrowser/nsEmbedStream.h
embedding/browser/webBrowser/nsWebBrowserContentPolicy.h
embedding/components/appstartup/src/nsAppStartupNotifier.h
embedding/components/commandhandler/src/nsBaseCommandController.h
embedding/components/commandhandler/src/nsCommandGroup.cpp
embedding/components/commandhandler/src/nsCommandGroup.h
embedding/components/commandhandler/src/nsCommandManager.h
embedding/components/commandhandler/src/nsCommandParams.h
embedding/components/commandhandler/src/nsControllerCommandTable.h
embedding/components/find/src/nsFind.cpp
embedding/components/find/src/nsFind.h
embedding/components/find/src/nsWebBrowserFind.h
embedding/components/printingui/src/unixshared/nsPrintProgress.h
embedding/components/printingui/src/unixshared/nsPrintProgressParams.h
embedding/components/printingui/src/unixshared/nsPrintingPromptService.h
embedding/components/windowwatcher/src/nsDialogParamBlock.h
embedding/components/windowwatcher/src/nsWindowWatcher.cpp
embedding/components/windowwatcher/src/nsWindowWatcher.h
modules/libpref/public/Preferences.h
modules/libpref/src/Preferences.cpp
modules/libpref/src/nsPrefBranch.h
rdf/base/src/nsContainerEnumerator.cpp
rdf/base/src/nsInMemoryDataSource.cpp
rdf/base/src/nsRDFContentSink.cpp
rdf/base/src/nsRDFService.cpp
rdf/base/src/nsRDFXMLSerializer.cpp
rdf/base/src/rdfTriplesSerializer.cpp
rdf/datasource/src/nsFileSystemDataSource.h
rdf/tests/rdfcat/rdfcat.cpp
rdf/tests/rdfpoll/rdfpoll.cpp
rdf/tests/triplescat/triplescat.cpp
rdf/util/public/nsRDFResource.h
xpcom/base/AvailableMemoryTracker.cpp
xpcom/base/SystemMemoryReporter.cpp
xpcom/base/nsCycleCollector.cpp
xpcom/base/nsDumpUtils.h
xpcom/base/nsGZFileWriter.h
xpcom/base/nsIStatusReporter.idl
xpcom/base/nsInterfaceRequestorAgg.cpp
xpcom/base/nsMemoryInfoDumper.cpp
xpcom/base/nsMemoryInfoDumper.h
xpcom/base/nsMemoryReporterManager.cpp
xpcom/base/nsMemoryReporterManager.h
xpcom/base/nsMessageLoop.cpp
xpcom/base/nsMessageLoop.h
xpcom/base/nsStatusReporterManager.h
xpcom/base/nsVersionComparatorImpl.h
xpcom/build/nsXPComInit.cpp
xpcom/components/ModuleUtils.h
xpcom/components/nsNativeComponentLoader.h
xpcom/ds/nsArray.h
xpcom/ds/nsHashPropertyBag.cpp
xpcom/ds/nsHashPropertyBag.h
xpcom/ds/nsINIParserImpl.cpp
xpcom/ds/nsINIParserImpl.h
xpcom/ds/nsSupportsArray.h
xpcom/glue/GenericFactory.h
xpcom/glue/nsCategoryCache.h
xpcom/glue/nsThreadUtils.cpp
xpcom/io/nsAppFileLocationProvider.cpp
xpcom/io/nsBinaryStream.h
xpcom/io/nsDirectoryService.h
xpcom/io/nsIOUtil.h
xpcom/io/nsStreamUtils.cpp
xpcom/reflect/xptinfo/ShimInterfaceInfo.h
xpcom/tests/TestCOMArray.cpp
xpcom/tests/TestCallTemplates.cpp
xpcom/tests/TestRacingServiceManager.cpp
xpcom/tests/TestThreadPoolListener.cpp
xpcom/tests/TestThreadUtils.cpp
xpcom/tests/TestTimers.cpp
--- a/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
+++ b/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
@@ -991,26 +991,24 @@ nsDocShellTreeOwner::GetOwnerRequestor()
 
 class DefaultTooltipTextProvider MOZ_FINAL : public nsITooltipTextProvider
 {
 public:
     DefaultTooltipTextProvider();
 
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSITOOLTIPTEXTPROVIDER
-
+    
 protected:
-    ~DefaultTooltipTextProvider() {}
-
     nsCOMPtr<nsIAtom>   mTag_dialog;
     nsCOMPtr<nsIAtom>   mTag_dialogheader;
     nsCOMPtr<nsIAtom>   mTag_window;
 };
 
-// NS_IMPL_ISUPPORTS(DefaultTooltipTextProvider, nsITooltipTextProvider)
+NS_IMPL_ISUPPORTS(DefaultTooltipTextProvider, nsITooltipTextProvider)
 
 DefaultTooltipTextProvider::DefaultTooltipTextProvider()
 {
     // There are certain element types which we don't want to use
     // as tool tip text. 
     mTag_dialog       = do_GetAtom("dialog");
     mTag_dialogheader = do_GetAtom("dialogheader");
     mTag_window       = do_GetAtom("window");   
--- a/embedding/browser/webBrowser/nsDocShellTreeOwner.h
+++ b/embedding/browser/webBrowser/nsDocShellTreeOwner.h
@@ -141,23 +141,21 @@ protected:
 //
 // The class that listens to the chrome events and tells the embedding
 // chrome to show tooltips, as appropriate. Handles registering itself
 // with the DOM with AddChromeListeners() and removing itself with
 // RemoveChromeListeners().
 //
 class ChromeTooltipListener : public nsIDOMEventListener
 {
-protected:
-  virtual ~ChromeTooltipListener ( ) ;
-
 public:
   NS_DECL_ISUPPORTS
   
   ChromeTooltipListener ( nsWebBrowser* inBrowser, nsIWebBrowserChrome* inChrome ) ;
+  virtual ~ChromeTooltipListener ( ) ;
 
   NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
   NS_IMETHOD MouseMove(nsIDOMEvent* aMouseEvent);
 
     // Add/remove the relevant listeners, based on what interfaces
     // the embedding chrome implements.
   NS_IMETHOD AddChromeListeners();
   NS_IMETHOD RemoveChromeListeners();
@@ -215,23 +213,21 @@ private:
 //
 // The class that listens to the chrome events and tells the embedding
 // chrome to show context menus, as appropriate. Handles registering itself
 // with the DOM with AddChromeListeners() and removing itself with
 // RemoveChromeListeners().
 //
 class ChromeContextMenuListener : public nsIDOMEventListener
 {
-protected:
-  virtual ~ChromeContextMenuListener ( ) ;
-
 public:
   NS_DECL_ISUPPORTS
   
   ChromeContextMenuListener ( nsWebBrowser* inBrowser, nsIWebBrowserChrome* inChrome ) ;
+  virtual ~ChromeContextMenuListener ( ) ;
 
   // nsIDOMContextMenuListener
   NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
 
   // Add/remove the relevant listeners, based on what interfaces
   // the embedding chrome implements.
   NS_IMETHOD AddChromeListeners();
   NS_IMETHOD RemoveChromeListeners();
--- a/embedding/browser/webBrowser/nsEmbedStream.h
+++ b/embedding/browser/webBrowser/nsEmbedStream.h
@@ -11,27 +11,25 @@
 #include "nsIURI.h"
 #include "nsIWebBrowser.h"
 
 class nsEmbedStream : public nsISupports
 {
  public:
 
   nsEmbedStream();
+  virtual ~nsEmbedStream();
 
   void      InitOwner      (nsIWebBrowser *aOwner);
   NS_METHOD Init           (void);
 
   NS_METHOD OpenStream     (nsIURI *aBaseURI, const nsACString& aContentType);
   NS_METHOD AppendToStream (const uint8_t *aData, uint32_t aLen);
   NS_METHOD CloseStream    (void);
 
   NS_DECL_ISUPPORTS
 
- protected:
-  virtual ~nsEmbedStream();
-
  private:
   nsIWebBrowser            *mOwner;
   nsCOMPtr<nsIOutputStream> mOutputStream;
 };
 
 #endif // nsEmbedStream_h__
--- a/embedding/browser/webBrowser/nsWebBrowserContentPolicy.h
+++ b/embedding/browser/webBrowser/nsWebBrowserContentPolicy.h
@@ -9,18 +9,16 @@
 /* f66bc334-1dd1-11b2-bab2-90e04fe15c19 */
 #define NS_WEBBROWSERCONTENTPOLICY_CID \
 { 0xf66bc334, 0x1dd1, 0x11b2, { 0xba, 0xb2, 0x90, 0xe0, 0x4f, 0xe1, 0x5c, 0x19 } }
 
 #define NS_WEBBROWSERCONTENTPOLICY_CONTRACTID "@mozilla.org/embedding/browser/content-policy;1"
 
 class nsWebBrowserContentPolicy : public nsIContentPolicy
 {
-protected:
-    virtual ~nsWebBrowserContentPolicy();
-
 public:
     nsWebBrowserContentPolicy();
-
+    virtual ~nsWebBrowserContentPolicy();
+    
     NS_DECL_ISUPPORTS
     NS_DECL_NSICONTENTPOLICY
 };
 
--- a/embedding/components/appstartup/src/nsAppStartupNotifier.h
+++ b/embedding/components/appstartup/src/nsAppStartupNotifier.h
@@ -16,15 +16,13 @@ class nsAppStartupNotifier : public nsIO
 {
 public:
     NS_DEFINE_STATIC_CID_ACCESSOR( NS_APPSTARTUPNOTIFIER_CID )
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSIOBSERVER
 
     nsAppStartupNotifier();
-
-protected:
     virtual ~nsAppStartupNotifier();
 };
 
 #endif /* nsAppStartupNotifier_h___ */
 
--- a/embedding/components/commandhandler/src/nsBaseCommandController.h
+++ b/embedding/components/commandhandler/src/nsBaseCommandController.h
@@ -22,36 +22,34 @@
 //   and all other text and html editing
 class nsBaseCommandController :  public nsIController,
                             public nsIControllerContext,
                             public nsIInterfaceRequestor,
                             public nsICommandController
 {
 public:
 
-  nsBaseCommandController();
+          nsBaseCommandController();
+  virtual ~nsBaseCommandController();
 
   // nsISupports
   NS_DECL_ISUPPORTS
     
   // nsIController
   NS_DECL_NSICONTROLLER
 
   // nsICommandController
   NS_DECL_NSICOMMANDCONTROLLER
 
   //nsIControllerContext
   NS_DECL_NSICONTROLLERCONTEXT
 
   // nsIInterfaceRequestor
   NS_DECL_NSIINTERFACEREQUESTOR
-
-protected:
-  virtual ~nsBaseCommandController();
-
+  
 private:
 
    nsWeakPtr mCommandContextWeakPtr;
    nsISupports* mCommandContextRawPtr;
    
    // Our reference to the command manager
    nsCOMPtr<nsIControllerCommandTable> mCommandTable;     
 };
--- a/embedding/components/commandhandler/src/nsCommandGroup.cpp
+++ b/embedding/components/commandhandler/src/nsCommandGroup.cpp
@@ -14,23 +14,22 @@
 #include "nsIControllerCommand.h"
 #include "nsCRT.h"
 
 
 class nsGroupsEnumerator : public nsISimpleEnumerator
 {
 public:
   nsGroupsEnumerator(nsControllerCommandGroup::GroupsHashtable &inHashTable);
+  virtual ~nsGroupsEnumerator();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISIMPLEENUMERATOR
 
 protected:
-  virtual ~nsGroupsEnumerator();
-
   static PLDHashOperator HashEnum(const nsACString &aKey, nsTArray<nsCString> *aData, void *aClosure);
   nsresult Initialize();
 
 protected:
 
   nsControllerCommandGroup::GroupsHashtable &mHashTable;
   int32_t mIndex;
   char **mGroupNames;        // array of pointers to char16_t* in the hash table
@@ -128,23 +127,22 @@ nsGroupsEnumerator::Initialize()
 #if 0
 #pragma mark -
 #endif
 
 class nsNamedGroupEnumerator : public nsISimpleEnumerator
 {
 public:
   nsNamedGroupEnumerator(nsTArray<nsCString> *inArray);
+  virtual ~nsNamedGroupEnumerator();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISIMPLEENUMERATOR
 
 protected:
-  virtual ~nsNamedGroupEnumerator();
-
   nsTArray<nsCString> *mGroupArray;
   int32_t mIndex;
 };
 
 nsNamedGroupEnumerator::nsNamedGroupEnumerator(nsTArray<nsCString> *inArray)
 : mGroupArray(inArray)
 , mIndex(-1)
 {
--- a/embedding/components/commandhandler/src/nsCommandGroup.h
+++ b/embedding/components/commandhandler/src/nsCommandGroup.h
@@ -16,26 +16,25 @@
 
 #define NS_CONTROLLER_COMMAND_GROUP_CONTRACTID \
  "@mozilla.org/embedcomp/controller-command-group;1"
 
 class nsControllerCommandGroup : public nsIControllerCommandGroup
 {
 public:
   nsControllerCommandGroup();
+  virtual ~nsControllerCommandGroup();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSICONTROLLERCOMMANDGROUP
 
 public:
   typedef nsClassHashtable<nsCStringHashKey, nsTArray<nsCString>> GroupsHashtable;
 
 protected:
-  virtual ~nsControllerCommandGroup();
-
   void ClearGroupsHash();
 
 protected:
   GroupsHashtable mGroupsHash; // hash keyed on command group.
                                // This could be made more space-efficient, maybe with atoms
 };
 
 #endif // nsCommandGroup_h__
--- a/embedding/components/commandhandler/src/nsCommandManager.h
+++ b/embedding/components/commandhandler/src/nsCommandManager.h
@@ -23,30 +23,30 @@ class nsCommandManager :  public nsIComm
                           public nsPICommandUpdater,
                           public nsSupportsWeakReference
 
 {
 public:
   typedef nsTArray<nsCOMPtr<nsIObserver> > ObserverList;
 
                         nsCommandManager();
+  virtual               ~nsCommandManager();
 
   // nsISupports
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsCommandManager, nsICommandManager)
   
   // nsICommandManager
   NS_DECL_NSICOMMANDMANAGER
   
   // nsPICommandUpdater
   NS_DECL_NSPICOMMANDUPDATER
 
 
 protected:
-  virtual               ~nsCommandManager();
 
   nsresult  GetControllerForCommand(const char * aCommand,
                                     nsIDOMWindow *aDirectedToThisWindow,
                                     nsIController** outController);
 
 
 protected:
   nsClassHashtable<nsCharPtrHashKey, ObserverList> mObserversTable;
--- a/embedding/components/commandhandler/src/nsCommandParams.h
+++ b/embedding/components/commandhandler/src/nsCommandParams.h
@@ -14,25 +14,25 @@
 
 
 
 class nsCommandParams : public nsICommandParams
 {
 public:
 
                       nsCommandParams();
+  virtual             ~nsCommandParams();
   
   
   NS_DECL_ISUPPORTS
   NS_DECL_NSICOMMANDPARAMS
 
   nsresult            Init();
   
 protected:
-  virtual             ~nsCommandParams();
 
   struct HashEntry : public PLDHashEntryHdr
   {
     nsCString      mEntryName;
 
     uint8_t       mEntryType;
     union {
     
--- a/embedding/components/commandhandler/src/nsControllerCommandTable.h
+++ b/embedding/components/commandhandler/src/nsControllerCommandTable.h
@@ -14,25 +14,24 @@
 class nsIControllerCommand;
 
 class  nsControllerCommandTable : public nsIControllerCommandTable,
                                   public nsSupportsWeakReference
 {
 public:
 
                   nsControllerCommandTable();
+  virtual         ~nsControllerCommandTable();
 
   NS_DECL_ISUPPORTS
 
   NS_DECL_NSICONTROLLERCOMMANDTABLE
 
 protected:
 
-  virtual         ~nsControllerCommandTable();
-
   // Hash table of nsIControllerCommands, keyed by command name.
   nsInterfaceHashtable<nsCStringHashKey, nsIControllerCommand> mCommandsTable;
 
   // Are we mutable?
   bool mMutable;
 };
 
 
--- a/embedding/components/find/src/nsFind.cpp
+++ b/embedding/components/find/src/nsFind.cpp
@@ -84,16 +84,20 @@ class nsFindContentIterator : public nsI
 public:
   nsFindContentIterator(bool aFindBackward)
     : mStartOffset(0),
       mEndOffset(0),
       mFindBackward(aFindBackward)
   {
   }
 
+  virtual ~nsFindContentIterator()
+  {
+  }
+
   // nsISupports
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     NS_DECL_CYCLE_COLLECTION_CLASS(nsFindContentIterator)
 
   // nsIContentIterator
   virtual nsresult Init(nsINode* aRoot)
   {
     NS_NOTREACHED("internal error");
@@ -110,21 +114,16 @@ public:
   virtual void First();
   virtual void Last();
   virtual void Next();
   virtual void Prev();
   virtual nsINode* GetCurrentNode();
   virtual bool IsDone();
   virtual nsresult PositionAt(nsINode* aCurNode);
 
-protected:
-  virtual ~nsFindContentIterator()
-  {
-  }
-
 private:
   nsCOMPtr<nsIContentIterator> mOuterIterator;
   nsCOMPtr<nsIContentIterator> mInnerIterator;
   // Can't use a range here, since we want to represent part of the
   // flattened tree, including native anonymous content.
   nsCOMPtr<nsIDOMNode> mStartNode;
   int32_t mStartOffset;
   nsCOMPtr<nsIDOMNode> mEndNode;
--- a/embedding/components/find/src/nsFind.h
+++ b/embedding/components/find/src/nsFind.h
@@ -29,22 +29,21 @@ class nsFindContentIterator;
 class nsFind : public nsIFind
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_NSIFIND
   NS_DECL_CYCLE_COLLECTION_CLASS(nsFind)
 
   nsFind();
+  virtual ~nsFind();
 
   static already_AddRefed<nsIDOMRange> CreateRange(nsINode* aNode);
 
 protected:
-  virtual ~nsFind();
-
   // Parameters set from the interface:
   //nsCOMPtr<nsIDOMRange> mRange;   // search only in this range
   bool mFindBackward;
   bool mCaseSensitive;
 
   nsCOMPtr<nsIWordBreaker> mWordBreaker;
 
   int32_t mIterOffset;
--- a/embedding/components/find/src/nsWebBrowserFind.h
+++ b/embedding/components/find/src/nsWebBrowserFind.h
@@ -30,31 +30,30 @@ class nsIDocShell;
 // class nsWebBrowserFind
 //*****************************************************************************   
 
 class nsWebBrowserFind  : public nsIWebBrowserFind,
                           public nsIWebBrowserFindInFrames
 {
 public:
                 nsWebBrowserFind();
+    virtual     ~nsWebBrowserFind();
     
     // nsISupports
     NS_DECL_ISUPPORTS
     
     // nsIWebBrowserFind
     NS_DECL_NSIWEBBROWSERFIND
                 
     // nsIWebBrowserFindInFrames
     NS_DECL_NSIWEBBROWSERFINDINFRAMES
 
 
 protected:
-
-    virtual     ~nsWebBrowserFind();
-
+     
     bool        CanFindNext()
                 { return mSearchString.Length() != 0; }
 
     nsresult    SearchInFrame(nsIDOMWindow* aWindow, bool aWrapping,
                               bool* didFind);
 
     nsresult    OnStartSearchFrame(nsIDOMWindow *aWindow);
     nsresult    OnEndSearchFrame(nsIDOMWindow *aWindow);
--- a/embedding/components/printingui/src/unixshared/nsPrintProgress.h
+++ b/embedding/components/printingui/src/unixshared/nsPrintProgress.h
@@ -20,18 +20,16 @@ class nsPrintProgress : public nsIPrintP
 {
 public: 
 	NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIPRINTPROGRESS
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSIPRINTSTATUSFEEDBACK
 
 	nsPrintProgress(nsIPrintSettings* aPrintSettings);
-
-protected:
 	virtual ~nsPrintProgress();
 
 private:
   nsresult ReleaseListeners();
 
   bool                              m_closeProgress;
   bool                              m_processCanceled;
   nsString                          m_pendingStatus;
--- a/embedding/components/printingui/src/unixshared/nsPrintProgressParams.h
+++ b/embedding/components/printingui/src/unixshared/nsPrintProgressParams.h
@@ -11,18 +11,16 @@
 
 class nsPrintProgressParams : public nsIPrintProgressParams
 {
 public: 
 	NS_DECL_ISUPPORTS
   NS_DECL_NSIPRINTPROGRESSPARAMS
 
 	nsPrintProgressParams();
-
-protected:
 	virtual ~nsPrintProgressParams();
 
 private:
   nsString mDocTitle;
   nsString mDocURL;
 };
 
 #endif
--- a/embedding/components/printingui/src/unixshared/nsPrintingPromptService.h
+++ b/embedding/components/printingui/src/unixshared/nsPrintingPromptService.h
@@ -27,26 +27,24 @@ class nsIDialogParamBlock;
 
 class nsPrintingPromptService: public nsIPrintingPromptService,
                                public nsIWebProgressListener
 {
 
 public:
 
   nsPrintingPromptService();
+  virtual ~nsPrintingPromptService();
 
   nsresult Init();
 
   NS_DECL_NSIPRINTINGPROMPTSERVICE
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_ISUPPORTS
 
-protected:
-  virtual ~nsPrintingPromptService();
-
 private:
   nsresult DoDialog(nsIDOMWindow *aParent,
                     nsIDialogParamBlock *aParamBlock, 
                     nsIWebBrowserPrint *aWebBrowserPrint, 
                     nsIPrintSettings* aPS,
                     const char *aChromeURL);
 
   nsCOMPtr<nsIWindowWatcher> mWatcher;
--- a/embedding/components/windowwatcher/src/nsDialogParamBlock.h
+++ b/embedding/components/windowwatcher/src/nsDialogParamBlock.h
@@ -15,23 +15,21 @@
  {0x4e4aae11, 0x8901, 0x46cc, {0x82, 0x17, 0xda, 0xd7, 0xc5, 0x41, 0x58, 0x73}}
 
 class nsString;
 
 class nsDialogParamBlock: public nsIDialogParamBlock
 {
 public: 	
   nsDialogParamBlock();
+  virtual ~nsDialogParamBlock();
    
   NS_DECL_NSIDIALOGPARAMBLOCK
   NS_DECL_ISUPPORTS	
 
-protected:
-  virtual ~nsDialogParamBlock();
-
 private:
 
   enum {kNumInts = 8, kNumStrings = 16};
 
   nsresult InBounds(int32_t inIndex, int32_t inMax) {
     return inIndex >= 0 && inIndex < inMax ? NS_OK : NS_ERROR_ILLEGAL_VALUE;
   }
   
--- a/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
+++ b/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
@@ -139,24 +139,22 @@ void nsWatcherWindowEntry::ReferenceSelf
 /****************************************************************
  ****************** nsWatcherWindowEnumerator *******************
  ****************************************************************/
 
 class nsWatcherWindowEnumerator : public nsISimpleEnumerator {
 
 public:
   nsWatcherWindowEnumerator(nsWindowWatcher *inWatcher);
+  virtual ~nsWatcherWindowEnumerator();
   NS_IMETHOD HasMoreElements(bool *retval);
   NS_IMETHOD GetNext(nsISupports **retval);
 
   NS_DECL_ISUPPORTS
 
-protected:
-  virtual ~nsWatcherWindowEnumerator();
-
 private:
   friend class nsWindowWatcher;
 
   nsWatcherWindowEntry *FindNext();
   void WindowRemoved(nsWatcherWindowEntry *inInfo);
 
   nsWindowWatcher      *mWindowWatcher;
   nsWatcherWindowEntry *mCurrentPosition;
--- a/embedding/components/windowwatcher/src/nsWindowWatcher.h
+++ b/embedding/components/windowwatcher/src/nsWindowWatcher.h
@@ -36,34 +36,33 @@ class nsWindowWatcher :
       public nsIWindowWatcher,
       public nsPIWindowWatcher,
       public nsIPromptFactory
 {
 friend class nsWatcherWindowEnumerator;
 
 public:
   nsWindowWatcher();
+  virtual ~nsWindowWatcher();
 
   nsresult Init();
 
   NS_DECL_ISUPPORTS
 
   NS_DECL_NSIWINDOWWATCHER
   NS_DECL_NSPIWINDOWWATCHER
   NS_DECL_NSIPROMPTFACTORY
 
   static int32_t    GetWindowOpenLocation(nsIDOMWindow *aParent,
                                           uint32_t aChromeFlags,
                                           bool aCalledFromJS,
                                           bool aPositionSpecified,
                                           bool aSizeSpecified);
 
 protected:
-  virtual ~nsWindowWatcher();
-
   friend class nsPromptService;
   bool AddEnumerator(nsWatcherWindowEnumerator* inEnumerator);
   bool RemoveEnumerator(nsWatcherWindowEnumerator* inEnumerator);
 
   nsWatcherWindowEntry *FindWindowEntry(nsIDOMWindow *aWindow);
   nsresult RemoveWindow(nsWatcherWindowEntry *inInfo);
 
   // Get the caller tree item.  Look on the JS stack, then fall back
--- a/modules/libpref/public/Preferences.h
+++ b/modules/libpref/public/Preferences.h
@@ -45,16 +45,17 @@ public:
   typedef mozilla::dom::PrefSetting PrefSetting;
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIPREFSERVICE
   NS_FORWARD_NSIPREFBRANCH(sRootBranch->)
   NS_DECL_NSIOBSERVER
 
   Preferences();
+  virtual ~Preferences();
 
   nsresult Init();
 
   /**
    * Reset loaded user prefs then read them
    */
   static nsresult ResetAndReadUserPrefs();
 
@@ -347,18 +348,16 @@ public:
   static void GetPreferences(InfallibleTArray<PrefSetting>* aPrefs);
   static void GetPreference(PrefSetting* aPref);
   static void SetPreference(const PrefSetting& aPref);
 
   static int64_t SizeOfIncludingThisAndOtherStuff(mozilla::MallocSizeOf aMallocSizeOf);
   static nsresult SetFloat(const char* aPref, float aValue);
 
 protected:
-  virtual ~Preferences();
-
   nsresult NotifyServiceObservers(const char *aSubject);
   /**
    * Reads the default pref file or, if that failed, try to save a new one.
    *
    * @return NS_OK if either action succeeded,
    *         or the error code related to the read attempt.
    */
   nsresult UseDefaultPrefFile();
--- a/modules/libpref/src/Preferences.cpp
+++ b/modules/libpref/src/Preferences.cpp
@@ -123,27 +123,27 @@ public:
 
   nsCString mPrefName;
   PrefChangedFunc mCallback;
 };
 
 class ValueObserver MOZ_FINAL : public nsIObserver,
                                 public ValueObserverHashKey
 {
-  ~ValueObserver() {
-    Preferences::RemoveObserver(this, mPrefName.get());
-  }
-
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
 
   ValueObserver(const char *aPref, PrefChangedFunc aCallback)
     : ValueObserverHashKey(aPref, aCallback) { }
 
+  ~ValueObserver() {
+    Preferences::RemoveObserver(this, mPrefName.get());
+  }
+
   void AppendClosure(void *aClosure) {
     mClosures.AppendElement(aClosure);
   }
 
   void RemoveClosure(void *aClosure) {
     mClosures.RemoveElement(aClosure);
   }
 
@@ -224,18 +224,16 @@ Preferences::SizeOfIncludingThisAndOther
   // We don't measure sRootBranch and sDefaultRootBranch here because
   // DMD indicates they are not significant.
   n += pref_SizeOfPrivateData(aMallocSizeOf);
   return n;
 }
 
 class PreferenceServiceReporter MOZ_FINAL : public nsIMemoryReporter
 {
-  ~PreferenceServiceReporter() {}
-
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMEMORYREPORTER
 
 protected:
   static const uint32_t kSuspectReferentCount = 1000;
   static PLDHashOperator CountReferents(PrefCallback* aKey,
                                         nsAutoPtr<PrefCallback>& aCallback,
--- a/modules/libpref/src/nsPrefBranch.h
+++ b/modules/libpref/src/nsPrefBranch.h
@@ -182,28 +182,27 @@ class nsPrefBranch : public nsIPrefBranc
   friend class mozilla::PreferenceServiceReporter;
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIPREFBRANCH
   NS_DECL_NSIPREFBRANCH2
   NS_DECL_NSIOBSERVER
 
   nsPrefBranch(const char *aPrefRoot, bool aDefaultBranch);
+  virtual ~nsPrefBranch();
 
   int32_t GetRootLength() { return mPrefRootLength; }
 
   nsresult RemoveObserverFromMap(const char *aDomain, nsISupports *aObserver);
 
   static void NotifyObserver(const char *newpref, void *data);
 
   size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf);
 
 protected:
-  virtual ~nsPrefBranch();
-
   nsPrefBranch()    /* disallow use of this constructer */
     { }
 
   nsresult   GetDefaultFromPropertiesFile(const char *aPrefName, char16_t **return_buf);
   // As SetCharPref, but without any check on the length of |aValue|
   nsresult   SetCharPrefInternal(const char *aPrefName, const char *aValue);
   // Reject strings that are more than 1Mb, warn if strings are more than 16kb
   nsresult   CheckSanityOfStringLength(const char* aPrefName, const nsAString& aValue);
@@ -228,42 +227,40 @@ private:
 };
 
 
 class nsPrefLocalizedString : public nsIPrefLocalizedString,
                               public nsISupportsString
 {
 public:
   nsPrefLocalizedString();
+  virtual ~nsPrefLocalizedString();
 
   NS_DECL_ISUPPORTS
   NS_FORWARD_NSISUPPORTSSTRING(mUnicodeString->)
   NS_FORWARD_NSISUPPORTSPRIMITIVE(mUnicodeString->)
 
   nsresult Init();
 
 private:
-  virtual ~nsPrefLocalizedString();
-
   NS_IMETHOD GetData(char16_t**);
   NS_IMETHOD SetData(const char16_t* aData);
   NS_IMETHOD SetDataWithLength(uint32_t aLength, const char16_t *aData);
 
   nsCOMPtr<nsISupportsString> mUnicodeString;
 };
 
 
 class nsRelativeFilePref : public nsIRelativeFilePref
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIRELATIVEFILEPREF
-
-  nsRelativeFilePref();
-
+  
+                nsRelativeFilePref();
+  virtual       ~nsRelativeFilePref();
+  
 private:
-  virtual ~nsRelativeFilePref();
-
   nsCOMPtr<nsIFile> mFile;
   nsCString mRelativeToKey;
 };
 
 #endif
--- a/rdf/base/src/nsContainerEnumerator.cpp
+++ b/rdf/base/src/nsContainerEnumerator.cpp
@@ -46,20 +46,19 @@ private:
     nsCOMPtr<nsIRDFDataSource>      mDataSource;
     nsCOMPtr<nsIRDFResource>        mContainer;
     nsCOMPtr<nsIRDFResource>        mOrdinalProperty;
 
     nsCOMPtr<nsISimpleEnumerator>   mCurrent;
     nsCOMPtr<nsIRDFNode>            mResult;
     int32_t mNextIndex;
 
-    virtual ~ContainerEnumeratorImpl();
-
 public:
     ContainerEnumeratorImpl(nsIRDFDataSource* ds, nsIRDFResource* container);
+    virtual ~ContainerEnumeratorImpl();
 
     nsresult Init();
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSISIMPLEENUMERATOR
 };
 
 nsrefcnt              ContainerEnumeratorImpl::gRefCnt;
--- a/rdf/base/src/nsInMemoryDataSource.cpp
+++ b/rdf/base/src/nsInMemoryDataSource.cpp
@@ -386,25 +386,25 @@ private:
     nsIRDFResource* mSource;
     nsIRDFResource* mProperty;
     nsIRDFNode*     mTarget;
     nsIRDFNode*     mValue;
     bool            mTruthValue;
     Assertion*      mNextAssertion;
     nsCOMPtr<nsISupportsArray> mHashArcs;
 
-    virtual ~InMemoryAssertionEnumeratorImpl();
-
 public:
     InMemoryAssertionEnumeratorImpl(InMemoryDataSource* aDataSource,
                                     nsIRDFResource* aSource,
                                     nsIRDFResource* aProperty,
                                     nsIRDFNode* aTarget,
                                     bool aTruthValue);
 
+    virtual ~InMemoryAssertionEnumeratorImpl();
+
     // nsISupports interface
     NS_DECL_ISUPPORTS
 
     // nsISimpleEnumerator interface
     NS_DECL_NSISIMPLEENUMERATOR
 };
 
 ////////////////////////////////////////////////////////////////////////
@@ -558,23 +558,23 @@ private:
     nsIRDFResource*     mCurrent;
     Assertion*          mAssertion;
     nsCOMPtr<nsISupportsArray> mHashArcs;
 
     static PLDHashOperator
     ArcEnumerator(PLDHashTable* aTable, PLDHashEntryHdr* aHdr,
                        uint32_t aNumber, void* aArg);
 
-    virtual ~InMemoryArcsEnumeratorImpl();
-
 public:
     InMemoryArcsEnumeratorImpl(InMemoryDataSource* aDataSource,
                                nsIRDFResource* aSource,
                                nsIRDFNode* aTarget);
 
+    virtual ~InMemoryArcsEnumeratorImpl();
+
     // nsISupports interface
     NS_DECL_ISUPPORTS
 
     // nsISimpleEnumerator interface
     NS_DECL_NSISIMPLEENUMERATOR
 };
 
 
--- a/rdf/base/src/nsRDFContentSink.cpp
+++ b/rdf/base/src/nsRDFContentSink.cpp
@@ -97,16 +97,17 @@ NS_STDCALL_FUNCPROTO(nsresult,
                      nsIRDFContainerUtils, MakeAlt,
                      (nsIRDFDataSource*, nsIRDFResource*, nsIRDFContainer**));
 
 class RDFContentSinkImpl : public nsIRDFContentSink,
                            public nsIExpatSink
 {
 public:
     RDFContentSinkImpl();
+    virtual ~RDFContentSinkImpl();
 
     // nsISupports
     NS_DECL_ISUPPORTS
     NS_DECL_NSIEXPATSINK
 
     // nsIContentSink
     NS_IMETHOD WillParse(void);
     NS_IMETHOD WillBuildModel(nsDTDMode aDTDMode);
@@ -140,18 +141,16 @@ public:
 
     typedef struct ContainerInfo {
         nsIRDFResource**  mType;
         nsContainerTestFn mTestFn;
         nsMakeContainerFn mMakeFn;
     } ContainerInfo;
 
 protected:
-    virtual ~RDFContentSinkImpl();
-
     // Text management
     void ParseText(nsIRDFNode **aResult);
 
     nsresult FlushText();
     nsresult AddText(const char16_t* aText, int32_t aLength);
 
     // RDF-specific parsing
     nsresult OpenRDF(const char16_t* aName);
--- a/rdf/base/src/nsRDFService.cpp
+++ b/rdf/base/src/nsRDFService.cpp
@@ -278,29 +278,27 @@ public:
     {
         mData.mLength = aLength;
         mData.mBytes = new uint8_t[aLength];
         memcpy(mData.mBytes, aBytes, aLength);
         NS_ADDREF(RDFServiceImpl::gRDFService);
         RDFServiceImpl::gRDFService->RegisterBlob(this);
     }
 
-protected:
     virtual ~BlobImpl()
     {
         RDFServiceImpl::gRDFService->UnregisterBlob(this);
         // Use NS_RELEASE2() here, because we want to decrease the
         // refcount, but not null out the gRDFService pointer (which is
         // what a vanilla NS_RELEASE() would do).
         nsrefcnt refcnt;
         NS_RELEASE2(RDFServiceImpl::gRDFService, refcnt);
         delete[] mData.mBytes;
     }
 
-public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIRDFNODE
     NS_DECL_NSIRDFBLOB
 
     Data mData;
 };
 
 NS_IMPL_ISUPPORTS(BlobImpl, nsIRDFNode, nsIRDFBlob)
@@ -517,29 +515,28 @@ LiteralImpl::GetValueConst(const char16_
 
 ////////////////////////////////////////////////////////////////////////
 // DateImpl
 //
 
 class DateImpl : public nsIRDFDate {
 public:
     DateImpl(const PRTime s);
+    virtual ~DateImpl();
 
     // nsISupports
     NS_DECL_ISUPPORTS
 
     // nsIRDFNode
     NS_DECL_NSIRDFNODE
 
     // nsIRDFDate
     NS_IMETHOD GetValue(PRTime *value);
 
 private:
-    virtual ~DateImpl();
-
     nsresult EqualsDate(nsIRDFDate* date, bool* result);
     PRTime mValue;
 };
 
 
 DateImpl::DateImpl(const PRTime s)
     : mValue(s)
 {
@@ -624,29 +621,28 @@ DateImpl::EqualsDate(nsIRDFDate* date, b
 
 ////////////////////////////////////////////////////////////////////////
 // IntImpl
 //
 
 class IntImpl : public nsIRDFInt {
 public:
     IntImpl(int32_t s);
+    virtual ~IntImpl();
 
     // nsISupports
     NS_DECL_ISUPPORTS
 
     // nsIRDFNode
     NS_DECL_NSIRDFNODE
 
     // nsIRDFInt
     NS_IMETHOD GetValue(int32_t *value);
 
 private:
-    virtual ~IntImpl();
-
     nsresult EqualsInt(nsIRDFInt* value, bool* result);
     int32_t mValue;
 };
 
 
 IntImpl::IntImpl(int32_t s)
     : mValue(s)
 {
--- a/rdf/base/src/nsRDFXMLSerializer.cpp
+++ b/rdf/base/src/nsRDFXMLSerializer.cpp
@@ -1008,17 +1008,16 @@ nsRDFXMLSerializer::SerializeEpilogue(ns
 
 class QNameCollector MOZ_FINAL : public rdfITripleVisitor {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_RDFITRIPLEVISITOR
     QNameCollector(nsRDFXMLSerializer* aParent)
         : mParent(aParent){}
 private:
-    ~QNameCollector() {}
     nsRDFXMLSerializer* mParent;
 };
 
 NS_IMPL_ISUPPORTS(QNameCollector, rdfITripleVisitor)
 nsresult
 QNameCollector::Visit(nsIRDFNode* aSubject, nsIRDFResource* aPredicate,
                       nsIRDFNode* aObject, bool aTruthValue)
 {
--- a/rdf/base/src/rdfTriplesSerializer.cpp
+++ b/rdf/base/src/rdfTriplesSerializer.cpp
@@ -23,17 +23,16 @@
 
 class TriplesVisitor MOZ_FINAL : public rdfITripleVisitor
 {
 public:
     TriplesVisitor(nsIOutputStream* aOut) : mOut(aOut) {}
     NS_DECL_RDFITRIPLEVISITOR
     NS_DECL_ISUPPORTS
 protected:
-    ~TriplesVisitor() {}
     nsresult writeResource(nsIRDFResource* aResource);
     nsIOutputStream* mOut;
 };
 
 NS_IMPL_ISUPPORTS(TriplesVisitor, rdfITripleVisitor)
 
 nsresult
 TriplesVisitor::writeResource(nsIRDFResource *aResource)
--- a/rdf/datasource/src/nsFileSystemDataSource.h
+++ b/rdf/datasource/src/nsFileSystemDataSource.h
@@ -22,21 +22,21 @@ class FileSystemDataSource MOZ_FINAL : p
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIRDFDATASOURCE
 
     static nsresult Create(nsISupports* aOuter,
                            const nsIID& aIID, void **aResult);
 
+    ~FileSystemDataSource() { }
     nsresult Init();
 
 private:
     FileSystemDataSource() { }
-    ~FileSystemDataSource() { }
 
     // helper methods
     bool     isFileURI(nsIRDFResource* aResource);
     bool     isDirURI(nsIRDFResource* aSource);
     nsresult GetVolumeList(nsISimpleEnumerator **aResult);
     nsresult GetFolderList(nsIRDFResource *source, bool allowHidden, bool onlyFirst, nsISimpleEnumerator **aResult);
     nsresult GetName(nsIRDFResource *source, nsIRDFLiteral** aResult);
     nsresult GetURL(nsIRDFResource *source, bool *isFavorite, nsIRDFLiteral** aResult);
--- a/rdf/tests/rdfcat/rdfcat.cpp
+++ b/rdf/tests/rdfcat/rdfcat.cpp
@@ -51,21 +51,19 @@ static NS_DEFINE_CID(kRDFXMLDataSourceCI
         return 1;\
     } \
     PR_END_MACRO
 
 ////////////////////////////////////////////////////////////////////////
 
 class ConsoleOutputStreamImpl : public nsIOutputStream
 {
-protected:
-    virtual ~ConsoleOutputStreamImpl(void) {}
-
 public:
     ConsoleOutputStreamImpl(void) {}
+    virtual ~ConsoleOutputStreamImpl(void) {}
 
     // nsISupports interface
     NS_DECL_ISUPPORTS
 
     // nsIOutputStream interface
     NS_IMETHOD Close(void) {
         return NS_OK;
     }
--- a/rdf/tests/rdfpoll/rdfpoll.cpp
+++ b/rdf/tests/rdfpoll/rdfpoll.cpp
@@ -50,21 +50,19 @@ static NS_DEFINE_CID(kRDFXMLDataSourceCI
 
 
 #include "nsIMemory.h" // for the CID
 
 ////////////////////////////////////////////////////////////////////////
 
 class Observer : public nsIRDFObserver
 {
-protected:
-    virtual ~Observer() {}
-
 public:
     Observer();
+    virtual ~Observer() {}
 
     // nsISupports interface
     NS_DECL_ISUPPORTS
 
     // nsIRDFObserver interface
     NS_DECL_NSIRDFOBSERVER
 };
 
--- a/rdf/tests/triplescat/triplescat.cpp
+++ b/rdf/tests/triplescat/triplescat.cpp
@@ -49,21 +49,19 @@
         return 1;\
     } \
     PR_END_MACRO
 
 ////////////////////////////////////////////////////////////////////////
 
 class ConsoleOutputStreamImpl : public nsIOutputStream
 {
-protected:
-    virtual ~ConsoleOutputStreamImpl(void) {}
-
 public:
     ConsoleOutputStreamImpl(void) {}
+    virtual ~ConsoleOutputStreamImpl(void) {}
 
     // nsISupports interface
     NS_DECL_ISUPPORTS
 
     // nsIOutputStream interface
     NS_IMETHOD Close(void) {
         return NS_OK;
     }
--- a/rdf/util/public/nsRDFResource.h
+++ b/rdf/util/public/nsRDFResource.h
@@ -33,19 +33,19 @@ public:
     NS_IMETHOD GetValueUTF8(nsACString& aResult);
     NS_IMETHOD GetValueConst(const char** aURI);
     NS_IMETHOD EqualsString(const char* aURI, bool* aResult);
     NS_IMETHOD GetDelegate(const char* aKey, REFNSIID aIID, void** aResult);
     NS_IMETHOD ReleaseDelegate(const char* aKey);
 
     // nsRDFResource methods:
     nsRDFResource(void);
+    virtual ~nsRDFResource(void);
 
 protected:
-    virtual ~nsRDFResource(void);
     static nsIRDFService* gRDFService;
     static nsrefcnt gRDFServiceRefCnt;
 
 protected:
     nsCString mURI;
 
     struct DelegateEntry {
         nsCString             mKey;
--- a/xpcom/base/AvailableMemoryTracker.cpp
+++ b/xpcom/base/AvailableMemoryTracker.cpp
@@ -391,18 +391,16 @@ NS_IMPL_ISUPPORTS(LowEventsReporter, nsI
 /**
  * This runnable is executed in response to a memory-pressure event; we spin
  * the event-loop when receiving the memory-pressure event in the hope that
  * other observers will synchronously free some memory that we'll be able to
  * purge here.
  */
 class nsJemallocFreeDirtyPagesRunnable MOZ_FINAL : public nsIRunnable
 {
-  ~nsJemallocFreeDirtyPagesRunnable() {}
-
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIRUNNABLE
 };
 
 NS_IMPL_ISUPPORTS(nsJemallocFreeDirtyPagesRunnable, nsIRunnable)
 
 NS_IMETHODIMP
@@ -419,18 +417,16 @@ nsJemallocFreeDirtyPagesRunnable::Run()
 
 /**
  * The memory pressure watcher is used for listening to memory-pressure events
  * and reacting upon them. We use one instance per process currently only for
  * cleaning up dirty unused pages held by jemalloc.
  */
 class nsMemoryPressureWatcher MOZ_FINAL : public nsIObserver
 {
-  ~nsMemoryPressureWatcher() {}
-
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
 
   void Init();
 
 private:
   static bool sFreeDirtyPages;
--- a/xpcom/base/SystemMemoryReporter.cpp
+++ b/xpcom/base/SystemMemoryReporter.cpp
@@ -109,18 +109,16 @@ IsAnonymous(const nsACString& aName)
   // as regular anonymous memory.  However, see below about tagged anonymous
   // memory.
   return aName.IsEmpty() ||
          StringBeginsWith(aName, NS_LITERAL_CSTRING("[stack:"));
 }
 
 class SystemReporter MOZ_FINAL : public nsIMemoryReporter
 {
-  ~SystemReporter() {}
-
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
 #define REPORT_WITH_CLEANUP(_path, _units, _amount, _desc, _cleanup)          \
   do {                                                                        \
     size_t amount = _amount;  /* evaluate _amount only once */                \
     if (amount > 0) {                                                         \
       nsresult rv;                                                            \
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -1268,21 +1268,19 @@ class nsCycleCollector : public nsIMemor
 
   nsPurpleBuffer mPurpleBuf;
 
   uint32_t mUnmergedNeeded;
   uint32_t mMergedInARow;
 
   JSPurpleBuffer* mJSPurpleBuffer;
 
-private:
-  virtual ~nsCycleCollector();
-
 public:
   nsCycleCollector();
+  virtual ~nsCycleCollector();
 
   void RegisterJSRuntime(CycleCollectedJSRuntime* aJSRuntime);
   void ForgetJSRuntime();
 
   void SetBeforeUnlinkCallback(CC_BeforeUnlinkCallback aBeforeUnlinkCB)
   {
     CheckThreadSafety();
     mBeforeUnlinkCB = aBeforeUnlinkCB;
@@ -1702,31 +1700,31 @@ private:
   FileInfo mCCLog;
 };
 
 NS_IMPL_ISUPPORTS(nsCycleCollectorLogSinkToFile, nsICycleCollectorLogSink)
 
 
 class nsCycleCollectorLogger MOZ_FINAL : public nsICycleCollectorListener
 {
-  ~nsCycleCollectorLogger()
-  {
-    ClearDescribers();
-  }
-
 public:
   nsCycleCollectorLogger()
     : mLogSink(nsCycleCollector_createLogSink())
     , mWantAllTraces(false)
     , mDisableLog(false)
     , mWantAfterProcessing(false)
     , mCCLog(nullptr)
   {
   }
 
+  ~nsCycleCollectorLogger()
+  {
+    ClearDescribers();
+  }
+
   NS_DECL_ISUPPORTS
 
   void SetAllTraces()
   {
     mWantAllTraces = true;
   }
 
   NS_IMETHOD AllTraces(nsICycleCollectorListener** aListener)
@@ -2506,32 +2504,32 @@ private:
 
 // JSPurpleBuffer keeps references to GCThings which might affect the
 // next cycle collection. It is owned only by itself and during unlink its
 // self reference is broken down and the object ends up killing itself.
 // If GC happens before CC, references to GCthings and the self reference are
 // removed.
 class JSPurpleBuffer
 {
-  ~JSPurpleBuffer()
-  {
-    MOZ_ASSERT(mValues.IsEmpty());
-    MOZ_ASSERT(mObjects.IsEmpty());
-    MOZ_ASSERT(mTenuredObjects.IsEmpty());
-  }
-
 public:
   JSPurpleBuffer(JSPurpleBuffer*& aReferenceToThis)
     : mReferenceToThis(aReferenceToThis)
   {
     mReferenceToThis = this;
     NS_ADDREF_THIS();
     mozilla::HoldJSObjects(this);
   }
 
+  ~JSPurpleBuffer()
+  {
+    MOZ_ASSERT(mValues.IsEmpty());
+    MOZ_ASSERT(mObjects.IsEmpty());
+    MOZ_ASSERT(mTenuredObjects.IsEmpty());
+  }
+
   void Destroy()
   {
     mReferenceToThis = nullptr;
     mValues.Clear();
     mObjects.Clear();
     mTenuredObjects.Clear();
     mozilla::DropJSObjects(this);
     NS_RELEASE_THIS();
--- a/xpcom/base/nsDumpUtils.h
+++ b/xpcom/base/nsDumpUtils.h
@@ -35,29 +35,29 @@
 class FdWatcher
   : public MessageLoopForIO::Watcher
   , public nsIObserver
 {
 protected:
   MessageLoopForIO::FileDescriptorWatcher mReadWatcher;
   int mFd;
 
-  virtual ~FdWatcher()
-  {
-    // StopWatching should have run.
-    MOZ_ASSERT(mFd == -1);
-  }
-
 public:
   FdWatcher()
     : mFd(-1)
   {
     MOZ_ASSERT(NS_IsMainThread());
   }
 
+  virtual ~FdWatcher()
+  {
+    // StopWatching should have run.
+    MOZ_ASSERT(mFd == -1);
+  }
+
   /**
    * Open the fd to watch.  If we encounter an error, return -1.
    */
   virtual int OpenFd() = 0;
 
   /**
    * Called when you can read() from the fd without blocking.  Note that this
    * function is also called when you're at eof (read() returns 0 in this case).
--- a/xpcom/base/nsGZFileWriter.h
+++ b/xpcom/base/nsGZFileWriter.h
@@ -10,20 +10,19 @@
 #include "nsIGZFileWriter.h"
 #include "zlib.h"
 
 /**
  * A simple class for writing .gz files.
  */
 class nsGZFileWriter : public nsIGZFileWriter
 {
-  virtual ~nsGZFileWriter();
-
 public:
   nsGZFileWriter();
+  virtual ~nsGZFileWriter();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIGZFILEWRITER
 
   /**
    * nsIGZFileWriter exposes two non-virtual overloads of Write().  We
    * duplicate them here so that you can call these overloads on a pointer to
    * the concrete nsGZFileWriter class.
--- a/xpcom/base/nsIStatusReporter.idl
+++ b/xpcom/base/nsIStatusReporter.idl
@@ -61,17 +61,16 @@ interface nsIStatusReporterManager : nsI
 
 %{C++
 
 /*
  * Note that this defaults 'process' to "", which is usually what's desired.
  */
 #define NS_STATUS_REPORTER_IMPLEMENT(_classname, _name, _desc_Function)       \
     class StatusReporter_##_classname MOZ_FINAL : public nsIStatusReporter {  \
-      ~StatusReporter_##_classname() {}                                       \
     public:                                                                   \
       NS_DECL_ISUPPORTS                                                       \
       NS_IMETHOD GetName(nsACString &name)                                    \
         { name.AssignLiteral(_name); return NS_OK; }                          \
       NS_IMETHOD GetProcess(nsACString &process)                              \
         { process.Truncate(); return NS_OK; }                                 \
       NS_IMETHOD GetDescription(nsACString &desc)                             \
         { _desc_Function(desc); return NS_OK; }                               \
--- a/xpcom/base/nsInterfaceRequestorAgg.cpp
+++ b/xpcom/base/nsInterfaceRequestorAgg.cpp
@@ -24,20 +24,19 @@ public:
     : mFirst(aFirst)
     , mSecond(aSecond)
     , mConsumerTarget(aConsumerTarget)
   {
     if (!mConsumerTarget) {
       mConsumerTarget = NS_GetCurrentThread();
     }
   }
+  ~nsInterfaceRequestorAgg();
 
 private:
-  ~nsInterfaceRequestorAgg();
-
   nsCOMPtr<nsIInterfaceRequestor> mFirst, mSecond;
   nsCOMPtr<nsIEventTarget> mConsumerTarget;
 };
 
 NS_IMPL_ISUPPORTS(nsInterfaceRequestorAgg, nsIInterfaceRequestor)
 
 NS_IMETHODIMP
 nsInterfaceRequestorAgg::GetInterface(const nsIID& aIID, void** aResult)
--- a/xpcom/base/nsMemoryInfoDumper.cpp
+++ b/xpcom/base/nsMemoryInfoDumper.cpp
@@ -491,18 +491,16 @@ public:
     DUMP(mWriter, ", \"description\": \"");
     DUMP(mWriter, description);
     DUMP(mWriter, "\"}");
 
     return NS_OK;
   }
 
 private:
-  ~DumpReportCallback() {}
-
   bool mIsFirst;
   nsRefPtr<nsGZFileWriter> mWriter;
 };
 
 NS_IMPL_ISUPPORTS(DumpReportCallback, nsIHandleReportCallback)
 
 } // namespace mozilla
 
@@ -585,18 +583,16 @@ public:
     , mrFilename(aFilename)
     , mIdentifier(aIdentifier)
   {
   }
 
   NS_IMETHOD Callback(nsISupports* aData);
 
 private:
-  ~TempDirMemoryFinishCallback() {}
-
   nsRefPtr<nsGZFileWriter> mrWriter;
   nsCOMPtr<nsIFile> mrTmpFile;
   nsCString mrFilename;
   nsString mIdentifier;
 };
 
 NS_IMPL_ISUPPORTS(TempDirMemoryFinishCallback, nsIFinishReportingCallback)
 
@@ -822,18 +818,16 @@ public:
     if (!mFinishDumping) {
       return NS_OK;
     }
 
     return mFinishDumping->Callback(mFinishDumpingData);
   }
 
 private:
-  ~FinishReportingCallback() {}
-
   nsCOMPtr<nsIFinishDumpingCallback> mFinishDumping;
   nsCOMPtr<nsISupports> mFinishDumpingData;
 };
 
 NS_IMPL_ISUPPORTS(FinishReportingCallback, nsIFinishReportingCallback)
 
 NS_IMETHODIMP
 nsMemoryInfoDumper::DumpMemoryReportsToNamedFile(
--- a/xpcom/base/nsMemoryInfoDumper.h
+++ b/xpcom/base/nsMemoryInfoDumper.h
@@ -15,24 +15,24 @@ class nsACString;
  * This class facilitates dumping information about our memory usage to disk.
  *
  * Its cpp file also has Linux-only code which watches various OS signals and
  * dumps memory info upon receiving a signal.  You can activate these listeners
  * by calling Initialize().
  */
 class nsMemoryInfoDumper : public nsIMemoryInfoDumper
 {
-  virtual ~nsMemoryInfoDumper();
-
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMEMORYINFODUMPER
 
   nsMemoryInfoDumper();
+  virtual ~nsMemoryInfoDumper();
 
+public:
   static void Initialize();
 
 #ifdef MOZ_DMD
   static nsresult DumpDMD(const nsAString& aIdentifier);
 #endif
 };
 
 #define NS_MEMORY_INFO_DUMPER_CID \
--- a/xpcom/base/nsMemoryReporterManager.cpp
+++ b/xpcom/base/nsMemoryReporterManager.cpp
@@ -113,18 +113,16 @@ ResidentFastDistinguishedAmount(int64_t*
 static nsresult
 ResidentUniqueDistinguishedAmount(int64_t* aN)
 {
   return GetProcSelfSmapsPrivate(aN);
 }
 
 class ResidentUniqueReporter MOZ_FINAL : public nsIMemoryReporter
 {
-  ~ResidentUniqueReporter() {}
-
 public:
   NS_DECL_ISUPPORTS
 
   NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
                            nsISupports* aData, bool aAnonymize)
   {
     int64_t amount = 0;
     nsresult rv = ResidentUniqueDistinguishedAmount(&amount);
@@ -555,18 +553,16 @@ public:
   }
 };
 NS_IMPL_ISUPPORTS(PrivateReporter, nsIMemoryReporter)
 #endif
 
 #ifdef HAVE_VSIZE_AND_RESIDENT_REPORTERS
 class VsizeReporter MOZ_FINAL : public nsIMemoryReporter
 {
-  ~VsizeReporter() {}
-
 public:
   NS_DECL_ISUPPORTS
 
   NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
                            nsISupports* aData, bool aAnonymize)
   {
     int64_t amount;
     nsresult rv = VsizeDistinguishedAmount(&amount);
@@ -582,18 +578,16 @@ public:
 "operating systems, 'resident' is a much better measure of the memory "
 "resources used by the process.");
   }
 };
 NS_IMPL_ISUPPORTS(VsizeReporter, nsIMemoryReporter)
 
 class ResidentReporter MOZ_FINAL : public nsIMemoryReporter
 {
-  ~ResidentReporter() {}
-
 public:
   NS_DECL_ISUPPORTS
 
   NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
                            nsISupports* aData, bool aAnonymize)
   {
     int64_t amount;
     nsresult rv = ResidentDistinguishedAmount(&amount);
@@ -616,18 +610,16 @@ NS_IMPL_ISUPPORTS(ResidentReporter, nsIM
 #ifdef XP_UNIX
 
 #include <sys/resource.h>
 
 #define HAVE_PAGE_FAULT_REPORTERS 1
 
 class PageFaultsSoftReporter MOZ_FINAL : public nsIMemoryReporter
 {
-  ~PageFaultsSoftReporter() {}
-
 public:
   NS_DECL_ISUPPORTS
 
   NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
                            nsISupports* aData, bool aAnonymize)
   {
     struct rusage usage;
     int err = getrusage(RUSAGE_SELF, &usage);
@@ -660,18 +652,16 @@ PageFaultsHardDistinguishedAmount(int64_
     return NS_ERROR_FAILURE;
   }
   *aAmount = usage.ru_majflt;
   return NS_OK;
 }
 
 class PageFaultsHardReporter MOZ_FINAL : public nsIMemoryReporter
 {
-  ~PageFaultsHardReporter() {}
-
 public:
   NS_DECL_ISUPPORTS
 
   NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
                            nsISupports* aData, bool aAnonymize)
   {
     int64_t amount = 0;
     nsresult rv = PageFaultsHardDistinguishedAmount(&amount);
@@ -709,18 +699,16 @@ HeapOverheadRatio(jemalloc_stats_t* aSta
 {
   return (int64_t)10000 *
     (aStats->waste + aStats->bookkeeping + aStats->page_cache) /
     ((double)aStats->allocated);
 }
 
 class JemallocHeapReporter MOZ_FINAL : public nsIMemoryReporter
 {
-  ~JemallocHeapReporter() {}
-
 public:
   NS_DECL_ISUPPORTS
 
   NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
                            nsISupports* aData, bool aAnonymize)
   {
     jemalloc_stats_t stats;
     jemalloc_stats(&stats);
@@ -815,18 +803,16 @@ NS_IMPL_ISUPPORTS(JemallocHeapReporter, 
 // registered with nsMemoryReporterManager entirely within nsAtomTable.cpp.
 // However, the obvious time to register it is when the table is initialized,
 // and that happens before XPCOM components are initialized, which means the
 // RegisterStrongMemoryReporter call fails.  So instead we do it here.
 class AtomTablesReporter MOZ_FINAL : public nsIMemoryReporter
 {
   MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf)
 
-  ~AtomTablesReporter() {}
-
 public:
   NS_DECL_ISUPPORTS
 
   NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
                            nsISupports* aData, bool aAnonymize)
   {
     return MOZ_COLLECT_REPORT(
       "explicit/atom-tables", KIND_HEAP, UNITS_BYTES,
@@ -1452,32 +1438,28 @@ nsMemoryReporterManager::UnblockRegistra
   mIsRegistrationBlocked = false;
   return NS_OK;
 }
 
 // This is just a wrapper for int64_t that implements nsISupports, so it can be
 // passed to nsIMemoryReporter::CollectReports.
 class Int64Wrapper MOZ_FINAL : public nsISupports
 {
-  ~Int64Wrapper() {}
-
 public:
   NS_DECL_ISUPPORTS
   Int64Wrapper() : mValue(0)
   {
   }
   int64_t mValue;
 };
 
 NS_IMPL_ISUPPORTS0(Int64Wrapper)
 
 class ExplicitCallback MOZ_FINAL : public nsIHandleReportCallback
 {
-  ~ExplicitCallback() {}
-
 public:
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD Callback(const nsACString& aProcess, const nsACString& aPath,
                       int32_t aKind, int32_t aUnits, int64_t aAmount,
                       const nsACString& aDescription,
                       nsISupports* aWrappedExplicit)
   {
--- a/xpcom/base/nsMemoryReporterManager.h
+++ b/xpcom/base/nsMemoryReporterManager.h
@@ -19,23 +19,22 @@ class nsITimer;
 namespace mozilla {
 namespace dom {
 class MemoryReport;
 }
 }
 
 class nsMemoryReporterManager : public nsIMemoryReporterManager
 {
-  virtual ~nsMemoryReporterManager();
-
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIMEMORYREPORTERMANAGER
 
   nsMemoryReporterManager();
+  virtual ~nsMemoryReporterManager();
 
   // Gets the memory reporter manager service.
   static nsMemoryReporterManager* GetOrCreate()
   {
     nsCOMPtr<nsIMemoryReporterManager> imgr =
       do_GetService("@mozilla.org/memory-reporter-manager;1");
     return static_cast<nsMemoryReporterManager*>(imgr.get());
   }
--- a/xpcom/base/nsMessageLoop.cpp
+++ b/xpcom/base/nsMessageLoop.cpp
@@ -29,25 +29,26 @@ namespace {
  */
 class MessageLoopIdleTask
   : public Task
   , public SupportsWeakPtr<MessageLoopIdleTask>
 {
 public:
   MOZ_DECLARE_REFCOUNTED_TYPENAME(MessageLoopIdleTask)
   MessageLoopIdleTask(nsIRunnable* aTask, uint32_t aEnsureRunsAfterMS);
+  virtual ~MessageLoopIdleTask()
+  {
+  }
   virtual void Run();
 
 private:
   nsresult Init(uint32_t aEnsureRunsAfterMS);
 
   nsCOMPtr<nsIRunnable> mTask;
   nsCOMPtr<nsITimer> mTimer;
-
-  virtual ~MessageLoopIdleTask() {}
 };
 
 /**
  * This timer callback calls MessageLoopIdleTask::Run() when its timer fires.
  * (The timer can't call back into MessageLoopIdleTask directly since that's
  * not a refcounted object; it's owned by the MessageLoop.)
  *
  * We keep a weak reference to the MessageLoopIdleTask, although a raw pointer
@@ -55,24 +56,23 @@ private:
  * the MessageLoop deletes it), it cancels its timer.  But the weak pointer
  * saves us from worrying about an edge case somehow messing us up here.
  */
 class MessageLoopTimerCallback
   : public nsITimerCallback
 {
 public:
   MessageLoopTimerCallback(MessageLoopIdleTask* aTask);
+  virtual ~MessageLoopTimerCallback() {};
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSITIMERCALLBACK
 
 private:
   WeakPtr<MessageLoopIdleTask> mTask;
-
-  virtual ~MessageLoopTimerCallback() {}
 };
 
 MessageLoopIdleTask::MessageLoopIdleTask(nsIRunnable* aTask,
                                          uint32_t aEnsureRunsAfterMS)
   : mTask(aTask)
 {
   // Init() really shouldn't fail, but if it does, we schedule our runnable
   // immediately, because it's more important to guarantee that we run the task
--- a/xpcom/base/nsMessageLoop.h
+++ b/xpcom/base/nsMessageLoop.h
@@ -10,17 +10,16 @@
  * nsMessageLoop implements nsIMessageLoop, which wraps Chromium's MessageLoop
  * class and adds a bit of sugar.
  */
 class nsMessageLoop : public nsIMessageLoop
 {
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMESSAGELOOP
 
-private:
   virtual ~nsMessageLoop()
   {
   }
 };
 
 #define NS_MESSAGE_LOOP_CID \
 {0x67b3ac0c, 0xd806, 0x4d48, \
 {0x93, 0x9e, 0x6a, 0x81, 0x9e, 0x6c, 0x24, 0x8f}}
--- a/xpcom/base/nsStatusReporterManager.h
+++ b/xpcom/base/nsStatusReporterManager.h
@@ -12,30 +12,29 @@
 class nsStatusReporter MOZ_FINAL : public nsIStatusReporter
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSISTATUSREPORTER
 
   nsStatusReporter(nsACString& aProcess, nsACString& aDesc);
 
-private:
+  virtual ~nsStatusReporter();
+
+protected:
   nsCString sProcess;
   nsCString sName;
   nsCString sDesc;
-
-  virtual ~nsStatusReporter();
 };
 
 
 class nsStatusReporterManager : public nsIStatusReporterManager
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSISTATUSREPORTERMANAGER
 
   nsStatusReporterManager();
+  virtual ~nsStatusReporterManager();
 
 private:
   nsCOMArray<nsIStatusReporter> mReporters;
-
-  virtual ~nsStatusReporterManager();
 };
--- a/xpcom/base/nsVersionComparatorImpl.h
+++ b/xpcom/base/nsVersionComparatorImpl.h
@@ -5,18 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/Attributes.h"
 
 #include "nsIVersionComparator.h"
 
 class nsVersionComparatorImpl MOZ_FINAL : public nsIVersionComparator
 {
-  ~nsVersionComparatorImpl() {}
-
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIVERSIONCOMPARATOR
 };
 
 #define NS_VERSIONCOMPARATOR_CONTRACTID "@mozilla.org/xpcom/version-comparator;1"
 
 // c6e47036-ca94-4be3-963a-9abd8705f7a8
--- a/xpcom/build/nsXPComInit.cpp
+++ b/xpcom/build/nsXPComInit.cpp
@@ -375,18 +375,16 @@ private:
     NS_IMETHODIMP
     CollectReports(nsIHandleReportCallback* aHandleReport, nsISupports* aData,
                    bool aAnonymize)
     {
         return MOZ_COLLECT_REPORT(
             "explicit/icu", KIND_HEAP, UNITS_BYTES, MemoryAllocated(),
             "Memory used by ICU, a Unicode and globalization support library.");
     }
-
-    ~ICUReporter() {}
 };
 
 NS_IMPL_ISUPPORTS(ICUReporter, nsIMemoryReporter)
 
 /* static */ template<> Atomic<size_t> CountingAllocatorBase<ICUReporter>::sAmount(0);
 
 class OggReporter MOZ_FINAL : public nsIMemoryReporter,
                               public CountingAllocatorBase<OggReporter>
@@ -398,18 +396,16 @@ private:
     NS_IMETHODIMP
     CollectReports(nsIHandleReportCallback* aHandleReport, nsISupports* aData,
                    bool aAnonymize)
     {
         return MOZ_COLLECT_REPORT(
             "explicit/media/libogg", KIND_HEAP, UNITS_BYTES, MemoryAllocated(),
             "Memory allocated through libogg for Ogg, Theora, and related media files.");
     }
-
-    ~OggReporter() {}
 };
 
 NS_IMPL_ISUPPORTS(OggReporter, nsIMemoryReporter)
 
 /* static */ template<> Atomic<size_t> CountingAllocatorBase<OggReporter>::sAmount(0);
 
 #ifdef MOZ_VPX
 class VPXReporter MOZ_FINAL : public nsIMemoryReporter,
@@ -422,18 +418,16 @@ private:
     NS_IMETHODIMP
     CollectReports(nsIHandleReportCallback* aHandleReport, nsISupports* aData,
                    bool aAnonymize)
     {
         return MOZ_COLLECT_REPORT(
             "explicit/media/libvpx", KIND_HEAP, UNITS_BYTES, MemoryAllocated(),
             "Memory allocated through libvpx for WebM media files.");
     }
-
-    ~VPXReporter() {}
 };
 
 NS_IMPL_ISUPPORTS(VPXReporter, nsIMemoryReporter)
 
 /* static */ template<> Atomic<size_t> CountingAllocatorBase<VPXReporter>::sAmount(0);
 #endif /* MOZ_VPX */
 
 #ifdef MOZ_WEBM
@@ -447,18 +441,16 @@ private:
     NS_IMETHODIMP
     CollectReports(nsIHandleReportCallback* aHandleReport, nsISupports* aData,
                    bool aAnonymize)
     {
         return MOZ_COLLECT_REPORT(
             "explicit/media/libnestegg", KIND_HEAP, UNITS_BYTES, MemoryAllocated(),
             "Memory allocated through libnestegg for WebM media files.");
     }
-
-    ~NesteggReporter() {}
 };
 
 NS_IMPL_ISUPPORTS(NesteggReporter, nsIMemoryReporter)
 
 /* static */ template<> Atomic<size_t> CountingAllocatorBase<NesteggReporter>::sAmount(0);
 #endif /* MOZ_WEBM */
 
 EXPORT_XPCOM_API(nsresult)
--- a/xpcom/components/ModuleUtils.h
+++ b/xpcom/components/ModuleUtils.h
@@ -99,18 +99,16 @@ static nsresult                         
 
 #include "nsIModule.h"
 #include "nsISupportsUtils.h"
 
 namespace mozilla {
 
 class GenericModule MOZ_FINAL : public nsIModule
 {
-    ~GenericModule() {}
-
 public:
     GenericModule(const mozilla::Module* aData)
         : mData(aData)
     {
     }
 
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIMODULE
--- a/xpcom/components/nsNativeComponentLoader.h
+++ b/xpcom/components/nsNativeComponentLoader.h
@@ -8,26 +8,16 @@
 
 #include "nsISupports.h"
 #include "mozilla/ModuleLoader.h"
 #include "nsDataHashtable.h"
 #include "nsHashKeys.h"
 #include "mozilla/Module.h"
 #include "prlink.h"
 
-class nsNativeModuleLoader;
-
-namespace mozilla {
-template<>
-struct HasDangerousPublicDestructor<nsNativeModuleLoader>
-{
-  static const bool value = true;
-};
-}
-
 class nsNativeModuleLoader : public mozilla::ModuleLoader
 {
  public:
     NS_DECL_ISUPPORTS_INHERITED
 
     nsNativeModuleLoader() {}
     ~nsNativeModuleLoader() {}
 
--- a/xpcom/ds/nsArray.h
+++ b/xpcom/ds/nsArray.h
@@ -59,18 +59,16 @@ private:
         : nsArrayBase()
     {
     }
     nsArray(const nsArray& other);
     nsArray(const nsCOMArray_base& aBaseArray)
         : nsArrayBase(aBaseArray)
     {
     }
-
-    ~nsArray() {}
 };
 
 class nsArrayCC MOZ_FINAL : public nsArrayBase
 {
     friend class nsArrayBase;
 
 public:
     NS_DECL_CYCLE_COLLECTING_ISUPPORTS
@@ -81,13 +79,11 @@ private:
         : nsArrayBase()
     {
     }
     nsArrayCC(const nsArrayCC& other);
     nsArrayCC(const nsCOMArray_base& aBaseArray)
         : nsArrayBase(aBaseArray)
     {
     }
-
-    ~nsArrayCC() {}
 };
 
 #endif
--- a/xpcom/ds/nsHashPropertyBag.cpp
+++ b/xpcom/ds/nsHashPropertyBag.cpp
@@ -88,20 +88,17 @@ nsHashPropertyBag::DeleteProperty(const 
     return NS_OK;
 }
 
 
 //
 // nsSimpleProperty class and impl; used for GetEnumerator
 //
 
-class nsSimpleProperty MOZ_FINAL : public nsIProperty
-{
-    ~nsSimpleProperty() {}
-
+class nsSimpleProperty MOZ_FINAL : public nsIProperty {
 public:
     nsSimpleProperty(const nsAString& aName, nsIVariant* aValue)
         : mName(aName), mValue(aValue)
     {
     }
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSIPROPERTY
--- a/xpcom/ds/nsHashPropertyBag.h
+++ b/xpcom/ds/nsHashPropertyBag.h
@@ -11,32 +11,31 @@
 #include "nsIWritablePropertyBag2.h"
 #include "nsInterfaceHashtable.h"
 
 class nsHashPropertyBag : public nsIWritablePropertyBag
                                , public nsIWritablePropertyBag2
 {
 public:
     nsHashPropertyBag() { }
+    virtual ~nsHashPropertyBag() {}
 
     NS_DECL_THREADSAFE_ISUPPORTS
 
     NS_DECL_NSIPROPERTYBAG
 
     NS_DECL_NSIPROPERTYBAG2
 
     NS_DECL_NSIWRITABLEPROPERTYBAG
 
     NS_DECL_NSIWRITABLEPROPERTYBAG2
 
 protected:
     // a hash table of string -> nsIVariant
     nsInterfaceHashtable<nsStringHashKey, nsIVariant> mPropertyHash;
-
-    virtual ~nsHashPropertyBag() {}
 };
 
 // Note: NS_NewHashPropertyBag returns a HPB that
 // uses a non-thread-safe internal hash
 extern "C" nsresult
 NS_NewHashPropertyBag(nsIWritablePropertyBag* *_retval);
 
 #endif /* nsHashPropertyBag_h___ */
--- a/xpcom/ds/nsINIParserImpl.cpp
+++ b/xpcom/ds/nsINIParserImpl.cpp
@@ -7,18 +7,16 @@
 #include "nsINIParser.h"
 #include "nsStringEnumerator.h"
 #include "nsTArray.h"
 #include "mozilla/Attributes.h"
 
 class nsINIParserImpl MOZ_FINAL :
   public nsIINIParser
 {
-  ~nsINIParserImpl() {}
-
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIINIPARSER
 
   nsresult Init(nsIFile* aINIFile) {
     return mParser.Init(aINIFile);
   }
 
--- a/xpcom/ds/nsINIParserImpl.h
+++ b/xpcom/ds/nsINIParserImpl.h
@@ -15,17 +15,15 @@
 
 #define NS_INIPARSERFACTORY_CONTRACTID \
   "@mozilla.org/xpcom/ini-parser-factory;1"
 
 class nsINIParserFactory MOZ_FINAL :
   public nsIINIParserFactory,
   public nsIFactory
 {
-  ~nsINIParserFactory() {}
-
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIINIPARSERFACTORY
   NS_DECL_NSIFACTORY
 };
 
 #endif // nsINIParserImpl_h__
--- a/xpcom/ds/nsSupportsArray.h
+++ b/xpcom/ds/nsSupportsArray.h
@@ -8,22 +8,21 @@
 
 //#define DEBUG_SUPPORTSARRAY 1
 
 #include "nsISupportsArray.h"
 #include "mozilla/Attributes.h"
 
 static const uint32_t kAutoArraySize = 8;
 
-class nsSupportsArray MOZ_FINAL : public nsISupportsArray
-{
+class nsSupportsArray MOZ_FINAL : public nsISupportsArray {
+public:
+  nsSupportsArray(void);
   ~nsSupportsArray(void); // nonvirtual since we're not subclassed
 
-public:
-  nsSupportsArray(void);
   static nsresult
   Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
 
   NS_DECL_THREADSAFE_ISUPPORTS
 
   NS_DECL_NSISERIALIZABLE
 
   // nsICollection methods:
--- a/xpcom/glue/GenericFactory.h
+++ b/xpcom/glue/GenericFactory.h
@@ -15,18 +15,16 @@ namespace mozilla {
 
 /**
  * A generic factory which uses a constructor function to create instances.
  * This class is intended for use by the component manager and the generic
  * module.
  */
 class GenericFactory MOZ_FINAL : public nsIFactory
 {
-  ~GenericFactory() {}
-
 public:
   typedef Module::ConstructorProcPtr ConstructorProcPtr;
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIFACTORY
 
   GenericFactory(ConstructorProcPtr aCtor)
     : mCtor(aCtor)
--- a/xpcom/glue/nsCategoryCache.h
+++ b/xpcom/glue/nsCategoryCache.h
@@ -19,20 +19,19 @@
 #include "nsAutoPtr.h"
 #include "nsCOMArray.h"
 #include "nsInterfaceHashtable.h"
 
 #include "nsXPCOM.h"
 
 class NS_COM_GLUE nsCategoryObserver MOZ_FINAL : public nsIObserver
 {
-  ~nsCategoryObserver();
-
 public:
   nsCategoryObserver(const char* aCategory);
+  ~nsCategoryObserver();
 
   void ListenerDied();
   nsInterfaceHashtable<nsCStringHashKey, nsISupports>& GetHash()
   {
     return mHash;
   }
 
   NS_DECL_ISUPPORTS
--- a/xpcom/glue/nsThreadUtils.cpp
+++ b/xpcom/glue/nsThreadUtils.cpp
@@ -285,18 +285,16 @@ NS_ProcessNextEvent(nsIThread* aThread, 
 }
 
 #ifndef XPCOM_GLUE_AVOID_NSPR
 
 namespace {
 
 class nsNameThreadRunnable MOZ_FINAL : public nsIRunnable
 {
-  ~nsNameThreadRunnable() {}
-
 public:
   nsNameThreadRunnable(const nsACString& aName) : mName(aName) {}
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
 
 protected:
   const nsCString mName;
--- a/xpcom/io/nsAppFileLocationProvider.cpp
+++ b/xpcom/io/nsAppFileLocationProvider.cpp
@@ -446,44 +446,42 @@ public:
 
     *aResult = mNext;
     NS_IF_ADDREF(*aResult);
     mNext = nullptr;
 
     return *aResult ? NS_OK : NS_ERROR_FAILURE;
   }
 
+  // Virtual destructor since subclass nsPathsDirectoryEnumerator
+  // does not re-implement Release()
+
+  virtual ~nsAppDirectoryEnumerator()
+  {
+  }
+
 protected:
   nsIDirectoryServiceProvider* mProvider;
   const char** mCurrentKey;
   nsCOMPtr<nsIFile> mNext;
-
-  // Virtual destructor since subclass nsPathsDirectoryEnumerator
-  // does not re-implement Release()
-  virtual ~nsAppDirectoryEnumerator()
-  {
-  }
 };
 
 NS_IMPL_ISUPPORTS(nsAppDirectoryEnumerator, nsISimpleEnumerator)
 
 /* nsPathsDirectoryEnumerator and PATH_SEPARATOR
  * are not used on MacOS/X. */
 
 #if defined(XP_WIN) /* Win32 */
 #define PATH_SEPARATOR ';'
 #else
 #define PATH_SEPARATOR ':'
 #endif
 
-class nsPathsDirectoryEnumerator MOZ_FINAL
-  : public nsAppDirectoryEnumerator
+class nsPathsDirectoryEnumerator : public nsAppDirectoryEnumerator
 {
-  ~nsPathsDirectoryEnumerator() {}
-
 public:
   /**
    * aKeyList is a null-terminated list.
    * The first element is a path list.
    * The remainder are properties provided by aProvider.
    * They do not need to be publicly defined keys.
    */
   nsPathsDirectoryEnumerator(nsIDirectoryServiceProvider* aProvider,
--- a/xpcom/io/nsBinaryStream.h
+++ b/xpcom/io/nsBinaryStream.h
@@ -26,16 +26,20 @@
 // Derive from nsIObjectOutputStream so this class can be used as a superclass
 // by nsObjectOutputStream.
 class nsBinaryOutputStream : public nsIObjectOutputStream
 {
 public:
   nsBinaryOutputStream()
   {
   }
+  // virtual dtor since subclasses call our Release()
+  virtual ~nsBinaryOutputStream()
+  {
+  }
 
 protected:
   // nsISupports methods
   NS_DECL_ISUPPORTS
 
   // nsIOutputStream methods
   NS_DECL_NSIOUTPUTSTREAM
 
@@ -45,22 +49,16 @@ protected:
   // nsIObjectOutputStream methods
   NS_DECL_NSIOBJECTOUTPUTSTREAM
 
   // Call Write(), ensuring that all proffered data is written
   nsresult WriteFully(const char* aBuf, uint32_t aCount);
 
   nsCOMPtr<nsIOutputStream>       mOutputStream;
   nsCOMPtr<nsIStreamBufferAccess> mBufferAccess;
-
-private:
-  // virtual dtor since subclasses call our Release()
-  virtual ~nsBinaryOutputStream()
-  {
-  }
 };
 
 #define NS_BINARYINPUTSTREAM_CID        \
 { /* c521a612-2aad-46db-b6ab-3b821fb150b1 */       \
    0xc521a612,                                     \
    0x2aad,                                         \
    0x46db,                                         \
   {0xb6, 0xab, 0x3b, 0x82, 0x1f, 0xb1, 0x50, 0xb1} \
@@ -71,33 +69,31 @@ private:
 // Derive from nsIObjectInputStream so this class can be used as a superclass
 // by nsObjectInputStream.
 class nsBinaryInputStream : public nsIObjectInputStream
 {
 public:
   nsBinaryInputStream()
   {
   }
+  // virtual dtor since subclasses call our Release()
+  virtual ~nsBinaryInputStream()
+  {
+  }
 
 protected:
   // nsISupports methods
   NS_DECL_ISUPPORTS
 
   // nsIInputStream methods
   NS_DECL_NSIINPUTSTREAM
 
   // nsIBinaryInputStream methods
   NS_DECL_NSIBINARYINPUTSTREAM
 
   // nsIObjectInputStream methods
   NS_DECL_NSIOBJECTINPUTSTREAM
 
   nsCOMPtr<nsIInputStream>        mInputStream;
   nsCOMPtr<nsIStreamBufferAccess> mBufferAccess;
-
-private:
-  // virtual dtor since subclasses call our Release()
-  virtual ~nsBinaryInputStream()
-  {
-  }
 };
 
 #endif // nsBinaryStream_h___
--- a/xpcom/io/nsDirectoryService.h
+++ b/xpcom/io/nsDirectoryService.h
@@ -32,28 +32,27 @@ public:
 
   NS_DECL_NSIDIRECTORYSERVICE
 
   NS_DECL_NSIDIRECTORYSERVICEPROVIDER
 
   NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
 
   nsDirectoryService();
+  ~nsDirectoryService();
 
   static void RealInit();
   void RegisterCategoryProviders();
 
   static nsresult
   Create(nsISupports* aOuter, REFNSIID aIID, void** aResult);
 
   static nsDirectoryService* gService;
 
 private:
-  ~nsDirectoryService();
-
   nsresult GetCurrentProcessDirectory(nsIFile** aFile);
 
   nsInterfaceHashtable<nsCStringHashKey, nsIFile> mHashtable;
   nsTArray<nsCOMPtr<nsIDirectoryServiceProvider>> mProviders;
 
 public:
 
 #define DIR_ATOM(name_, value_) static nsIAtom* name_;
--- a/xpcom/io/nsIOUtil.h
+++ b/xpcom/io/nsIOUtil.h
@@ -12,16 +12,14 @@
     { 0x84, 0x5f, 0xe5, 0x8a, 0x8e, 0x6d, 0xe4, 0xc2 } }
 
 
 #include "nsIIOUtil.h"
 #include "mozilla/Attributes.h"
 
 class nsIOUtil MOZ_FINAL : public nsIIOUtil
 {
-  ~nsIOUtil() {}
-
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIOUTIL
 };
 
 #endif /* nsIOUtil_h__ */
--- a/xpcom/io/nsStreamUtils.cpp
+++ b/xpcom/io/nsStreamUtils.cpp
@@ -228,16 +228,21 @@ public:
     , mEventIsPending(false)
     , mCloseSource(true)
     , mCloseSink(true)
     , mCanceled(false)
     , mCancelStatus(NS_OK)
   {
   }
 
+  // virtual since subclasses call superclass Release()
+  virtual ~nsAStreamCopier()
+  {
+  }
+
   // kick off the async copy...
   nsresult Start(nsIInputStream* aSource,
                  nsIOutputStream* aSink,
                  nsIEventTarget* aTarget,
                  nsAsyncCopyCallbackFun aCallback,
                  void* aClosure,
                  uint32_t aChunksize,
                  bool aCloseSource,
@@ -465,21 +470,16 @@ protected:
   void*                          mClosure;
   uint32_t                       mChunkSize;
   bool                           mEventInProcess;
   bool                           mEventIsPending;
   bool                           mCloseSource;
   bool                           mCloseSink;
   bool                           mCanceled;
   nsresult                       mCancelStatus;
-
-  // virtual since subclasses call superclass Release()
-  virtual ~nsAStreamCopier()
-  {
-  }
 };
 
 NS_IMPL_ISUPPORTS(nsAStreamCopier,
                   nsIInputStreamCallback,
                   nsIOutputStreamCallback,
                   nsIRunnable)
 
 class nsStreamCopierIB MOZ_FINAL : public nsAStreamCopier
--- a/xpcom/reflect/xptinfo/ShimInterfaceInfo.h
+++ b/xpcom/reflect/xptinfo/ShimInterfaceInfo.h
@@ -35,17 +35,15 @@ public:
     static already_AddRefed<ShimInterfaceInfo>
     MaybeConstruct(const char* aName, JSContext* cx);
 
 private:
     ShimInterfaceInfo(const nsIID& aIID,
                       const char* aName,
                       const mozilla::dom::NativePropertyHooks* aNativePropHooks);
 
-    ~ShimInterfaceInfo() {}
-
 private:
     nsIID mIID;
     nsAutoCString mName;
     const mozilla::dom::NativePropertyHooks* mNativePropHooks;
 };
 
 #endif
--- a/xpcom/tests/TestCOMArray.cpp
+++ b/xpcom/tests/TestCOMArray.cpp
@@ -20,21 +20,20 @@ public:
 
   NS_IMETHOD_(MozExternalRefCountType) RefCnt() = 0;
   NS_IMETHOD_(int32_t) ID() = 0;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(IFoo, NS_IFOO_IID)
 
 class Foo MOZ_FINAL : public IFoo {
-  ~Foo();
-
 public:
 
   Foo(int32_t aID);
+  ~Foo();
 
   // nsISupports implementation
   NS_DECL_ISUPPORTS
 
   // IFoo implementation
   NS_IMETHOD_(MozExternalRefCountType) RefCnt() { return mRefCnt; }
   NS_IMETHOD_(int32_t) ID() { return mID; }
 
@@ -74,25 +73,24 @@ public:
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(IBar, NS_IBAR_IID)
 
 class Bar MOZ_FINAL : public IBar {
 public:
 
   explicit Bar(nsCOMArray<IBar>& aArray);
+  ~Bar();
 
   // nsISupports implementation
   NS_DECL_ISUPPORTS
 
   static int32_t sReleaseCalled;
 
 private:
-  ~Bar();
-
   nsCOMArray<IBar>& mArray;
 };
 
 int32_t Bar::sReleaseCalled = 0;
 
 typedef nsCOMArray<IBar> Array2;
 
 Bar::Bar(Array2& aArray)
--- a/xpcom/tests/TestCallTemplates.cpp
+++ b/xpcom/tests/TestCallTemplates.cpp
@@ -31,17 +31,16 @@ class NS_NO_VTABLE nsITestService : publ
     NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITESTSERVICE_IID)
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsITestService, NS_ITESTSERVICE_IID)
 
 class nsTestService MOZ_FINAL : public nsITestService,
                                 public nsSupportsWeakReference
 {
-    ~nsTestService() {}
   public:
     NS_DECL_ISUPPORTS
 };
 
 NS_IMPL_ISUPPORTS(nsTestService, nsITestService, nsISupportsWeakReference)
 
 #define NS_TEST_SERVICE_CONTRACTID "@mozilla.org/test/testservice;1"
 #define NS_TEST_SERVICE_CID \
--- a/xpcom/tests/TestRacingServiceManager.cpp
+++ b/xpcom/tests/TestRacingServiceManager.cpp
@@ -82,18 +82,16 @@ public:
   }
 
 private:
   ReentrantMonitor** mReentrantMonitorPtr;
 };
 
 class Factory MOZ_FINAL : public nsIFactory
 {
-  ~Factory() {}
-
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
   Factory() : mFirstComponentCreated(false) { }
 
   NS_IMETHOD CreateInstance(nsISupports* aDelegate,
                             const nsIID& aIID,
                             void** aResult);
@@ -104,18 +102,16 @@ public:
 
   bool mFirstComponentCreated;
 };
 
 NS_IMPL_ISUPPORTS(Factory, nsIFactory)
 
 class Component1 MOZ_FINAL : public nsISupports
 {
-  ~Component1() {}
-
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
   Component1() {
     // This is the real test - make sure that only one instance is ever created.
     int32_t count = PR_AtomicIncrement(&gComponent1Count);
     TEST_ASSERTION(count == 1, "Too many components created!");
   }
@@ -125,18 +121,16 @@ NS_IMPL_ADDREF(Component1)
 NS_IMPL_RELEASE(Component1)
 
 NS_INTERFACE_MAP_BEGIN(Component1)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 class Component2 MOZ_FINAL : public nsISupports
 {
-  ~Component2() {}
-
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
   Component2() {
     // This is the real test - make sure that only one instance is ever created.
     int32_t count = PR_AtomicIncrement(&gComponent2Count);
     TEST_ASSERTION(count == 1, "Too many components created!");
   }
--- a/xpcom/tests/TestThreadPoolListener.cpp
+++ b/xpcom/tests/TestThreadPoolListener.cpp
@@ -42,18 +42,16 @@ static bool gAllThreadsShutDown = false;
     if (!(_test)) { \
       NS_DebugBreak(NS_DEBUG_ABORT, _msg, #_test, __FILE__, __LINE__); \
     } \
   PR_END_MACRO
 #endif
 
 class Listener MOZ_FINAL : public nsIThreadPoolListener
 {
-  ~Listener() {}
-
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSITHREADPOOLLISTENER
 };
 
 NS_IMPL_ISUPPORTS(Listener, nsIThreadPoolListener)
 
 NS_IMETHODIMP
--- a/xpcom/tests/TestThreadUtils.cpp
+++ b/xpcom/tests/TestThreadUtils.cpp
@@ -29,24 +29,16 @@ class nsFoo : public nsISupports {
   NS_DECL_ISUPPORTS
   nsresult DoFoo(bool* aBool) {
     *aBool = true;
     return NS_OK;
   }
   virtual ~nsFoo() {}
 };
 
-namespace mozilla {
-template<>
-struct HasDangerousPublicDestructor<nsFoo>
-{
-  static const bool value = true;
-};
-}
-
 NS_IMPL_ISUPPORTS0(nsFoo)
 
 class TestSuicide : public nsRunnable {
   NS_IMETHOD Run() {
     // Runs first time on thread "Suicide", then dies on MainThread
     if (!NS_IsMainThread()) {
       mThread = do_GetCurrentThread();
       NS_DispatchToMainThread(this);
@@ -58,19 +50,18 @@ class TestSuicide : public nsRunnable {
     return NS_OK;
   }
 
 private:
   nsCOMPtr<nsIThread> mThread;
 };
 
 class nsBar : public nsISupports {
+  NS_DECL_ISUPPORTS
   virtual ~nsBar() {}
-public:
-  NS_DECL_ISUPPORTS
   void DoBar1(void) {
     gRunnableExecuted[TEST_CALL_VOID_ARG_VOID_RETURN] = true;
   }
   nsresult DoBar2(void) {
     gRunnableExecuted[TEST_CALL_VOID_ARG_NONVOID_RETURN] = true;
     return NS_OK;
   }
   void DoBar3(nsFoo* aFoo) {
--- a/xpcom/tests/TestTimers.cpp
+++ b/xpcom/tests/TestTimers.cpp
@@ -87,18 +87,16 @@ public:
     NS_ASSERTION(!*mThreadPtr, "Timer called back more than once!");
     *mThreadPtr = current;
 
     mon.Notify();
 
     return NS_OK;
   }
 private:
-  ~TimerCallback() {}
-
   nsIThread** mThreadPtr;
   ReentrantMonitor* mReentrantMonitor;
 };
 
 NS_IMPL_ISUPPORTS(TimerCallback, nsITimerCallback)
 
 nsresult
 TestTargetedTimers()