Bug 758992 - Make the classes which use the XPCOM nsISupports implementation macros final, to avoid the warning about deleting using a pointer to a base class with virtual functions and no virtual dtor (more toolkit parts); blanket-r=bzbarsky
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 23 Jul 2012 17:26:48 -0400
changeset 100233 eb030d799dd26d939fb0d8c08cce47daa3d7557a
parent 100232 7b3328b25a8d67f2f2e735184017561693031b34
child 100234 bae6464a3431fdc44269728de681799246a3d894
push id23169
push useremorley@mozilla.com
push dateTue, 24 Jul 2012 09:54:00 +0000
treeherdermozilla-central@a26e751bfb54 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs758992
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 758992 - Make the classes which use the XPCOM nsISupports implementation macros final, to avoid the warning about deleting using a pointer to a base class with virtual functions and no virtual dtor (more toolkit parts); blanket-r=bzbarsky
toolkit/components/filepicker/nsFileView.cpp
toolkit/components/remote/nsGTKRemoteService.h
toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
--- a/toolkit/components/filepicker/nsFileView.cpp
+++ b/toolkit/components/filepicker/nsFileView.cpp
@@ -20,26 +20,27 @@
 #include "nsQuickSort.h"
 #include "nsIAtom.h"
 #include "nsIAutoCompleteResult.h"
 #include "nsIAutoCompleteSearch.h"
 #include "nsISimpleEnumerator.h"
 #include "nsAutoPtr.h"
 #include "nsIMutableArray.h"
 #include "nsTArray.h"
+#include "mozilla/Attributes.h"
 
 #include "nsWildCard.h"
 
 class nsIDOMDataTransfer;
  
 #define NS_FILECOMPLETE_CID { 0xcb60980e, 0x18a5, 0x4a77, \
                             { 0x91, 0x10, 0x81, 0x46, 0x61, 0x4c, 0xa7, 0xf0 } }
 #define NS_FILECOMPLETE_CONTRACTID "@mozilla.org/autocomplete/search;1?name=file"
 
-class nsFileResult : public nsIAutoCompleteResult
+class nsFileResult MOZ_FINAL : public nsIAutoCompleteResult
 {
 public:
   // aSearchString is the text typed into the autocomplete widget
   // aSearchParam is the picker's currently displayed directory
   nsFileResult(const nsAString& aSearchString, const nsAString& aSearchParam);
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIAUTOCOMPLETERESULT
@@ -164,17 +165,17 @@ NS_IMETHODIMP nsFileResult::GetImageAt(P
   return NS_OK;
 }
 
 NS_IMETHODIMP nsFileResult::RemoveValueAt(PRInt32 rowIndex, bool removeFromDb)
 {
   return NS_OK;
 }
 
-class nsFileComplete : public nsIAutoCompleteSearch
+class nsFileComplete MOZ_FINAL : public nsIAutoCompleteSearch
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIAUTOCOMPLETESEARCH
 };
 
 NS_IMPL_ISUPPORTS1(nsFileComplete, nsIAutoCompleteSearch)
 
--- a/toolkit/components/remote/nsGTKRemoteService.h
+++ b/toolkit/components/remote/nsGTKRemoteService.h
@@ -9,18 +9,19 @@
 #define __nsGTKRemoteService_h__
 
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
 #include <gtk/gtk.h>
 
 #include "nsInterfaceHashtable.h"
 #include "nsXRemoteService.h"
+#include "mozilla/Attributes.h"
 
-class nsGTKRemoteService : public nsXRemoteService
+class nsGTKRemoteService MOZ_FINAL : public nsXRemoteService
 {
 public:
   // We will be a static singleton, so don't use the ordinary methods.
   NS_DECL_ISUPPORTS
   NS_DECL_NSIREMOTESERVICE
 
 
   nsGTKRemoteService() :
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
@@ -12,18 +12,19 @@
 #include "nsArrayUtils.h"
 #include "prnetdb.h"
 #include "prenv.h"
 #include "nsPrintfCString.h"
 #include "nsNetUtil.h"
 #include "nsISupportsPrimitives.h"
 #include "nsIGSettingsService.h"
 #include "nsInterfaceHashtable.h"
+#include "mozilla/Attributes.h"
 
-class nsUnixSystemProxySettings : public nsISystemProxySettings {
+class nsUnixSystemProxySettings MOZ_FINAL : public nsISystemProxySettings {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSISYSTEMPROXYSETTINGS
 
   nsUnixSystemProxySettings() {}
   nsresult Init();
 
 private: