Skip to content

Commit 9e7e7c3

Browse files
author
Ehsan Akhgari
committed
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
1 parent d0798fe commit 9e7e7c3

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@
1818
#include "nsIPrefService.h"
1919
#include "nsIJSContextStack.h"
2020
#include "nspr.h"
21+
#include "mozilla/Attributes.h"
2122

2223
extern PRLogModuleInfo *MCD;
2324

2425
// Security Manager for new XPCONNECT enabled JS Context
2526
// Right now it allows all access
2627

27-
class AutoConfigSecMan : public nsIXPCSecurityManager
28+
class AutoConfigSecMan MOZ_FINAL : public nsIXPCSecurityManager
2829
{
2930
public:
3031
NS_DECL_ISUPPORTS

toolkit/xre/nsAppRunner.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "mozilla/dom/ContentChild.h"
2525

2626
#include "mozilla/Util.h"
27+
#include "mozilla/Attributes.h"
2728

2829
#include "nsAppRunner.h"
2930
#include "mozilla/AppData.h"
@@ -1180,7 +1181,7 @@ ScopedXPCOMStartup::Initialize()
11801181
* This is a little factory class that serves as a singleton-service-factory
11811182
* for the nativeappsupport object.
11821183
*/
1183-
class nsSingletonFactory : public nsIFactory
1184+
class nsSingletonFactory MOZ_FINAL : public nsIFactory
11841185
{
11851186
public:
11861187
NS_DECL_ISUPPORTS

toolkit/xre/nsUpdateDriver.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "nsIThread.h"
1414
#include "nsCOMPtr.h"
1515
#include "nsString.h"
16+
#include "mozilla/Attributes.h"
1617
#endif
1718

1819
class nsIFile;
@@ -59,7 +60,7 @@ NS_HIDDEN_(nsresult) ProcessUpdates(nsIFile *greDir, nsIFile *appDir,
5960
// updater application in the background for applying an update.
6061
// XXX ehsan this is living in this file in order to make use of the existing
6162
// stuff here, we might want to move it elsewhere in the future.
62-
class nsUpdateProcessor : public nsIUpdateProcessor
63+
class nsUpdateProcessor MOZ_FINAL : public nsIUpdateProcessor
6364
{
6465
public:
6566
nsUpdateProcessor();

toolkit/xre/nsXREDirProvider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ nsXREDirProvider::DoStartup()
792792
return NS_OK;
793793
}
794794

795-
class ProfileChangeStatusImpl : public nsIProfileChangeStatus
795+
class ProfileChangeStatusImpl MOZ_FINAL : public nsIProfileChangeStatus
796796
{
797797
public:
798798
NS_DECL_ISUPPORTS

toolkit/xre/nsXREDirProvider.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212

1313
#include "nsCOMPtr.h"
1414
#include "nsCOMArray.h"
15+
#include "mozilla/Attributes.h"
1516

16-
class nsXREDirProvider : public nsIDirectoryServiceProvider2,
17-
public nsIProfileStartup
17+
class nsXREDirProvider MOZ_FINAL : public nsIDirectoryServiceProvider2,
18+
public nsIProfileStartup
1819
{
1920
public:
2021
// we use a custom isupports implementation (no refcount)

0 commit comments

Comments
 (0)