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 (extensions/auth/ parts); r=bsmedberg
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 12 Jun 2012 23:13:31 -0400
changeset 96723 df550e51189f09bd4abc4d86f60acbb2f3edcddf
parent 96722 80e7e9a4dbafeebf84fbd5b692f45f567e0884bd
child 96724 4e6998d64114049f06876afd12826e392a18f352
push id22934
push useremorley@mozilla.com
push dateFri, 15 Jun 2012 12:37:14 +0000
treeherdermozilla-central@892f95753777 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs758992
milestone16.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 (extensions/auth/ parts); r=bsmedberg
extensions/auth/nsAuthGSSAPI.h
extensions/auth/nsAuthSASL.h
extensions/auth/nsAuthSambaNTLM.h
extensions/auth/nsHttpNegotiateAuth.h
--- a/extensions/auth/nsAuthGSSAPI.h
+++ b/extensions/auth/nsAuthGSSAPI.h
@@ -4,16 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsAuthGSSAPI_h__
 #define nsAuthGSSAPI_h__
 
 #include "nsAuth.h"
 #include "nsIAuthModule.h"
 #include "nsString.h"
+#include "mozilla/Attributes.h"
 
 #define GSS_USE_FUNCTION_POINTERS 1
 
 #include "gssapi.h"
 
 // The nsAuthGSSAPI class provides responses for the GSS-API Negotiate method
 // as specified by Microsoft in draft-brezak-spnego-http-04.txt
 
@@ -29,17 +30,17 @@
  *
  * When used with a threadsafe Kerberos library, multiple instantiations of 
  * this class may happily co-exist. Methods may be sequentially called from 
  * multiple threads. The nature of the GSSAPI protocol is such that a correct 
  * implementation will never call methods in parallel, as the results of the 
  * last call are required as input to the next.
  */
 
-class nsAuthGSSAPI : public nsIAuthModule
+class nsAuthGSSAPI MOZ_FINAL : public nsIAuthModule
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIAUTHMODULE
 
     nsAuthGSSAPI(pType package);
 
     static void Shutdown();
--- a/extensions/auth/nsAuthSASL.h
+++ b/extensions/auth/nsAuthSASL.h
@@ -4,23 +4,24 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsAuthSASL_h__
 #define nsAuthSASL_h__
 
 #include "nsIAuthModule.h"
 #include "nsString.h"
 #include "nsCOMPtr.h"
+#include "mozilla/Attributes.h"
 
 /* This class is implemented using the nsAuthGSSAPI class, and the same
  * thread safety constraints which are documented in nsAuthGSSAPI.h
  * apply to this class
  */
 
-class nsAuthSASL : public nsIAuthModule
+class nsAuthSASL MOZ_FINAL : public nsIAuthModule
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIAUTHMODULE
 
     nsAuthSASL();
 
 private:
--- a/extensions/auth/nsAuthSambaNTLM.h
+++ b/extensions/auth/nsAuthSambaNTLM.h
@@ -6,28 +6,29 @@
 #ifndef nsAuthSambaNTLM_h__
 #define nsAuthSambaNTLM_h__
 
 #include "nsIAuthModule.h"
 #include "nsString.h"
 #include "nsCOMPtr.h"
 #include "prio.h"
 #include "prproces.h"
+#include "mozilla/Attributes.h"
 
 /**
  * This is an implementation of NTLM authentication that does single-signon
  * by obtaining the user's Unix username, parsing it into DOMAIN\name format,
  * and then asking Samba's ntlm_auth tool to do the authentication for us
  * using the user's password cached in winbindd, if available. If the
  * password is not available then this component fails to instantiate so
  * nsHttpNTLMAuth will fall back to a different NTLM implementation.
  * NOTE: at time of writing, this requires patches to be added to the stock
  * Samba winbindd and ntlm_auth!  
  */
-class nsAuthSambaNTLM : public nsIAuthModule
+class nsAuthSambaNTLM MOZ_FINAL : public nsIAuthModule
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIAUTHMODULE
 
     nsAuthSambaNTLM();
 
     // We spawn the ntlm_auth helper from the module constructor, because
--- a/extensions/auth/nsHttpNegotiateAuth.h
+++ b/extensions/auth/nsHttpNegotiateAuth.h
@@ -4,21 +4,22 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsHttpNegotiateAuth_h__
 #define nsHttpNegotiateAuth_h__
 
 #include "nsIHttpAuthenticator.h"
 #include "nsIURI.h"
 #include "nsSubstring.h"
+#include "mozilla/Attributes.h"
 
 // The nsHttpNegotiateAuth class provides responses for the GSS-API Negotiate method
 // as specified by Microsoft in draft-brezak-spnego-http-04.txt
 
-class nsHttpNegotiateAuth : public nsIHttpAuthenticator
+class nsHttpNegotiateAuth MOZ_FINAL : public nsIHttpAuthenticator
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIHTTPAUTHENTICATOR
 
 private:
     // returns the value of the given boolean pref
     bool TestBoolPref(const char *pref);