Bug 833505: Add MOZ_FINAL annotations to calm GCC's -Wdelete-non-virtual-dtor warnings in nsGIOProtocolHandler and nsGSettingsService. blanket-r=ehsan
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 22 Jan 2013 11:57:09 -0800
changeset 119506 a7ba9c337287f09adeefd672b132ed2e8821b042
parent 119505 4d567ebd26246e6c8fb2e3ebc7cc976837d42338
child 119507 f67a97dda10d9f5dcae3d87ad5590bff1e95d25a
push id24208
push userryanvm@gmail.com
push dateWed, 23 Jan 2013 16:13:14 +0000
treeherdermozilla-central@35e0c12f4332 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs833505
milestone21.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 833505: Add MOZ_FINAL annotations to calm GCC's -Wdelete-non-virtual-dtor warnings in nsGIOProtocolHandler and nsGSettingsService. blanket-r=ehsan
extensions/gio/nsGIOProtocolHandler.cpp
toolkit/system/gnome/nsGSettingsService.cpp
toolkit/system/gnome/nsGSettingsService.h
--- a/extensions/gio/nsGIOProtocolHandler.cpp
+++ b/extensions/gio/nsGIOProtocolHandler.cpp
@@ -130,17 +130,17 @@ static void mount_enclosing_volume_finis
 static void mount_operation_ask_password (GMountOperation   *mount_op,
                                           const char        *message,
                                           const char        *default_user,
                                           const char        *default_domain,
                                           GAskPasswordFlags flags,
                                           gpointer          user_data);
 //-----------------------------------------------------------------------------
 
-class nsGIOInputStream : public nsIInputStream
+class nsGIOInputStream MOZ_FINAL : public nsIInputStream
 {
   public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIINPUTSTREAM
 
     nsGIOInputStream(const nsCString &uriSpec)
       : mSpec(uriSpec)
       , mChannel(nullptr)
@@ -875,28 +875,28 @@ mount_operation_ask_password (GMountOper
   g_mount_operation_set_password(mount_op, NS_ConvertUTF16toUTF8(pass).get());
   nsMemory::Free(user);
   nsMemory::Free(pass);
   g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_HANDLED);
 }
 
 //-----------------------------------------------------------------------------
 
-class nsGIOProtocolHandler : public nsIProtocolHandler
-                           , public nsIObserver
+class nsGIOProtocolHandler MOZ_FINAL : public nsIProtocolHandler
+                                     , public nsIObserver
 {
   public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIPROTOCOLHANDLER
     NS_DECL_NSIOBSERVER
 
     nsresult Init();
 
   private:
-    void   InitSupportedProtocolsPref(nsIPrefBranch *prefs);
+    void InitSupportedProtocolsPref(nsIPrefBranch *prefs);
     bool IsSupportedProtocol(const nsCString &spec);
 
     nsCString mSupportedProtocols;
 };
 
 NS_IMPL_ISUPPORTS2(nsGIOProtocolHandler, nsIProtocolHandler, nsIObserver)
 
 nsresult
--- a/toolkit/system/gnome/nsGSettingsService.cpp
+++ b/toolkit/system/gnome/nsGSettingsService.cpp
@@ -72,17 +72,17 @@ GSETTINGS_FUNCTIONS
 #define g_variant_is_of_type _g_variant_is_of_type
 #define g_variant_new_int32 _g_variant_new_int32
 #define g_variant_new_boolean _g_variant_new_boolean
 #define g_variant_new_string _g_variant_new_string
 #define g_variant_unref _g_variant_unref
 
 static PRLibrary *gioLib = nullptr;
 
-class nsGSettingsCollection : public nsIGSettingsCollection
+class nsGSettingsCollection MOZ_FINAL : public nsIGSettingsCollection
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIGSETTINGSCOLLECTION
 
   nsGSettingsCollection(GSettings* aSettings) : mSettings(aSettings),
                                                 mKeys(NULL) {}
   ~nsGSettingsCollection();
--- a/toolkit/system/gnome/nsGSettingsService.h
+++ b/toolkit/system/gnome/nsGSettingsService.h
@@ -6,17 +6,17 @@
 #ifndef nsGSettingsService_h_
 #define nsGSettingsService_h_
 
 #include "nsIGSettingsService.h"
 
 #define NS_GSETTINGSSERVICE_CID \
 {0xbfd4a9d8, 0xd886, 0x4161, {0x81, 0xef, 0x88, 0x68, 0xda, 0x11, 0x41, 0x70}}
 
-class nsGSettingsService : public nsIGSettingsService
+class nsGSettingsService MOZ_FINAL : public nsIGSettingsService
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIGSETTINGSSERVICE
 
   NS_HIDDEN_(nsresult) Init();
 
 private: