Bug 810495 - 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. r=jcranmer
authoraceman <acelists@atlas.sk>
Tue, 14 Apr 2015 22:25:03 +0200
changeset 22427 05c47091340d5fb014aad8fbfd0723a3461560d5
parent 22426 33593fa70bb9af4b4cd22939651ef91a663cee8a
child 22428 23ac15cc2dfc1ba24d72eb27fbb25bb857e59c6d
push id1420
push usermbanner@mozilla.com
push dateMon, 29 Jun 2015 20:47:24 +0000
treeherdercomm-beta@b3db00bb24e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjcranmer
bugs810495
Bug 810495 - 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. r=jcranmer
ldap/xpcom/src/nsLDAPBERElement.h
mail/components/migration/src/nsProfileMigrator.h
mailnews/base/src/nsMsgFolderNotificationService.h
mailnews/extensions/fts3/src/nsFts3Tokenizer.h
mailnews/extensions/fts3/src/nsGlodaRankerFunction.h
mailnews/imap/src/nsAutoSyncManager.h
mailnews/imap/src/nsAutoSyncState.h
--- a/ldap/xpcom/src/nsLDAPBERElement.h
+++ b/ldap/xpcom/src/nsLDAPBERElement.h
@@ -7,17 +7,17 @@
 #include "lber.h"
 #include "nsILDAPBERElement.h"
 
 // 070af769-b7f5-40e7-81be-196155ead84c
 #define NS_LDAPBERELEMENT_CID \
   { 0x070af769, 0xb7f5, 0x40e7, \
       { 0x81, 0xbe, 0x19, 0x61, 0x55, 0xea, 0xd8, 0x4c }}
 
-class nsLDAPBERElement : public nsILDAPBERElement
+class nsLDAPBERElement final : public nsILDAPBERElement
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSILDAPBERELEMENT
 
   nsLDAPBERElement();
 
 private:
--- a/mail/components/migration/src/nsProfileMigrator.h
+++ b/mail/components/migration/src/nsProfileMigrator.h
@@ -12,17 +12,17 @@
 #include "nsCOMPtr.h"
 #include "nsDirectoryServiceDefs.h"
 
 #include "nsStringGlue.h"
 
 #define NS_THUNDERBIRD_PROFILEIMPORT_CID \
 { 0xb3c78baf, 0x3a52, 0x41d2, { 0x97, 0x18, 0xc3, 0x19, 0xbe, 0xf9, 0xaf, 0xfc } }
 
-class nsProfileMigrator : public nsIProfileMigrator
+class nsProfileMigrator final : public nsIProfileMigrator
 {
 public:
   NS_DECL_NSIPROFILEMIGRATOR
   NS_DECL_ISUPPORTS
 
   nsProfileMigrator() { };
 
 protected:
--- a/mailnews/base/src/nsMsgFolderNotificationService.h
+++ b/mailnews/base/src/nsMsgFolderNotificationService.h
@@ -6,17 +6,17 @@
 #ifndef nsMsgFolderNotificationService_h__
 #define nsMsgFolderNotificationService_h__
 
 #include "nsIMsgFolderNotificationService.h"
 #include "nsIMsgFolderListener.h"
 #include "nsTObserverArray.h"
 #include "nsCOMPtr.h"
 
-class nsMsgFolderNotificationService : public nsIMsgFolderNotificationService
+class nsMsgFolderNotificationService final : public nsIMsgFolderNotificationService
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGFOLDERNOTIFICATIONSERVICE
 
   nsMsgFolderNotificationService();
 
 private:
--- a/mailnews/extensions/fts3/src/nsFts3Tokenizer.h
+++ b/mailnews/extensions/fts3/src/nsFts3Tokenizer.h
@@ -7,17 +7,17 @@
 #define nsFts3Tokenizer_h__
 
 #include "nsCOMPtr.h"
 #include "nsIFts3Tokenizer.h"
 #include "fts3_tokenizer.h"
 
 extern const sqlite3_tokenizer_module* getWindowsTokenizer();
 
-class nsFts3Tokenizer : public nsIFts3Tokenizer {
+class nsFts3Tokenizer final : public nsIFts3Tokenizer {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIFTS3TOKENIZER
 
     nsFts3Tokenizer();
 
 private:
   ~nsFts3Tokenizer();
--- a/mailnews/extensions/fts3/src/nsGlodaRankerFunction.h
+++ b/mailnews/extensions/fts3/src/nsGlodaRankerFunction.h
@@ -6,17 +6,17 @@
 #define _nsGlodaRankerFunction_h_
 
 #include "mozIStorageFunction.h"
 
 /**
  * Basically a port of the example FTS3 ranking function to mozStorage's
  * view of the universe.  This might get fancier at some point.
  */
-class nsGlodaRankerFunction : public mozIStorageFunction
+class nsGlodaRankerFunction final : public mozIStorageFunction
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_MOZISTORAGEFUNCTION
 
   nsGlodaRankerFunction();
 private:
   ~nsGlodaRankerFunction();
--- a/mailnews/imap/src/nsAutoSyncManager.h
+++ b/mailnews/imap/src/nsAutoSyncManager.h
@@ -81,53 +81,53 @@ class nsIMsgFolder;
  * for any messages it previously determined it should download). Then it sets
  * a timer, and in the timer callback, it processes the update q, by calling 
  * InitiateAutoSync on the first folder in the update q.
  */
  
 /**
  * Default strategy implementation to prioritize messages in the download queue.   
  */
-class nsDefaultAutoSyncMsgStrategy : public nsIAutoSyncMsgStrategy
+class nsDefaultAutoSyncMsgStrategy final : public nsIAutoSyncMsgStrategy
 {
   static const uint32_t kFirstPassMessageSize = 60U*1024U; // 60K
 
   public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIAUTOSYNCMSGSTRATEGY
 
     nsDefaultAutoSyncMsgStrategy();
 
   private:
     ~nsDefaultAutoSyncMsgStrategy();
 };
 
 /**
  * Default strategy implementation to prioritize folders in the download queue.  
  */
-class nsDefaultAutoSyncFolderStrategy : public nsIAutoSyncFolderStrategy
+class nsDefaultAutoSyncFolderStrategy final : public nsIAutoSyncFolderStrategy
 {
   public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIAUTOSYNCFOLDERSTRATEGY
 
     nsDefaultAutoSyncFolderStrategy();
 
   private:
     ~nsDefaultAutoSyncFolderStrategy();
 };
 
 // see the end of the page for auto-sync internals
 
 /**
  * Manages background message download operations for offline imap folders. 
  */
-class nsAutoSyncManager : public nsIObserver, 
-                          public nsIUrlListener,
-                          public nsIAutoSyncManager
+class nsAutoSyncManager final : public nsIObserver,
+                                public nsIUrlListener,
+                                public nsIAutoSyncManager
 {
   static const PRTime kAutoSyncFreq = 60UL * (PR_USEC_PER_SEC * 60UL);  // 1hr
   static const uint32_t kDefaultUpdateInterval = 10UL;                  // 10min
   static const int32_t kTimerIntervalInMs = 400;
   static const uint32_t kNumberOfHeadersToProcess = 250U;
   // enforced size of the first group that will be downloaded before idle time
   static const uint32_t kFirstGroupSizeLimit = 60U*1024U /* 60K */; 
   static const int32_t kIdleTimeInSec = 10;
--- a/mailnews/imap/src/nsAutoSyncState.h
+++ b/mailnews/imap/src/nsAutoSyncState.h
@@ -44,17 +44,17 @@ class MsgStrategyComparatorAdaptor
   nsIMsgFolder *mFolder;
   nsIMsgDatabase *mDatabase;
 };
 
 
 /**
  * Facilitates auto-sync capabilities for imap folders.
  */
-class nsAutoSyncState : public nsIAutoSyncState, public nsIUrlListener
+class nsAutoSyncState final : public nsIAutoSyncState, public nsIUrlListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIAUTOSYNCSTATE
   NS_DECL_NSIURLLISTENER
 
   nsAutoSyncState(nsImapMailFolder *aOwnerFolder, PRTime aLastSyncTime = 0UL);