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 (xre parts); r=jrmuizel

This commit is contained in:
Ehsan Akhgari 2012-06-19 23:49:05 -04:00
parent 41dce8c5c1
commit 9a6c20bd77
5 changed files with 10 additions and 6 deletions

View File

@ -18,13 +18,14 @@
#include "nsIPrefService.h"
#include "nsIJSContextStack.h"
#include "nspr.h"
#include "mozilla/Attributes.h"
extern PRLogModuleInfo *MCD;
// Security Manager for new XPCONNECT enabled JS Context
// Right now it allows all access
class AutoConfigSecMan : public nsIXPCSecurityManager
class AutoConfigSecMan MOZ_FINAL : public nsIXPCSecurityManager
{
public:
NS_DECL_ISUPPORTS

View File

@ -24,6 +24,7 @@
#include "mozilla/dom/ContentChild.h"
#include "mozilla/Util.h"
#include "mozilla/Attributes.h"
#include "nsAppRunner.h"
#include "mozilla/AppData.h"
@ -1180,7 +1181,7 @@ ScopedXPCOMStartup::Initialize()
* This is a little factory class that serves as a singleton-service-factory
* for the nativeappsupport object.
*/
class nsSingletonFactory : public nsIFactory
class nsSingletonFactory MOZ_FINAL : public nsIFactory
{
public:
NS_DECL_ISUPPORTS

View File

@ -13,6 +13,7 @@
#include "nsIThread.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "mozilla/Attributes.h"
#endif
class nsIFile;
@ -59,7 +60,7 @@ NS_HIDDEN_(nsresult) ProcessUpdates(nsIFile *greDir, nsIFile *appDir,
// updater application in the background for applying an update.
// XXX ehsan this is living in this file in order to make use of the existing
// stuff here, we might want to move it elsewhere in the future.
class nsUpdateProcessor : public nsIUpdateProcessor
class nsUpdateProcessor MOZ_FINAL : public nsIUpdateProcessor
{
public:
nsUpdateProcessor();

View File

@ -792,7 +792,7 @@ nsXREDirProvider::DoStartup()
return NS_OK;
}
class ProfileChangeStatusImpl : public nsIProfileChangeStatus
class ProfileChangeStatusImpl MOZ_FINAL : public nsIProfileChangeStatus
{
public:
NS_DECL_ISUPPORTS

View File

@ -12,9 +12,10 @@
#include "nsCOMPtr.h"
#include "nsCOMArray.h"
#include "mozilla/Attributes.h"
class nsXREDirProvider : public nsIDirectoryServiceProvider2,
public nsIProfileStartup
class nsXREDirProvider MOZ_FINAL : public nsIDirectoryServiceProvider2,
public nsIProfileStartup
{
public:
// we use a custom isupports implementation (no refcount)