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 (more toolkit parts); blanket-r=bzbarsky

This commit is contained in:
Ehsan Akhgari 2012-07-18 12:12:55 -04:00
Родитель 4322843c84
Коммит 1f8f1532ad
9 изменённых файлов: 21 добавлений и 12 удалений

Просмотреть файл

@ -12,8 +12,9 @@
#include "prtypes.h" #include "prtypes.h"
#include "nsCOMPtr.h" #include "nsCOMPtr.h"
#include "nsTArray.h" #include "nsTArray.h"
#include "mozilla/Attributes.h"
class nsAutoCompleteSimpleResult : public nsIAutoCompleteSimpleResult class nsAutoCompleteSimpleResult MOZ_FINAL : public nsIAutoCompleteSimpleResult
{ {
public: public:
nsAutoCompleteSimpleResult(); nsAutoCompleteSimpleResult();

Просмотреть файл

@ -24,6 +24,7 @@
#include "nsTextFormatter.h" #include "nsTextFormatter.h"
#include "nsXPCOMCID.h" #include "nsXPCOMCID.h"
#include "plstr.h" #include "plstr.h"
#include "mozilla/Attributes.h"
#ifdef MOZ_WIDGET_COCOA #ifdef MOZ_WIDGET_COCOA
#include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
@ -44,7 +45,7 @@
#define NS_COMMANDLINE_CID \ #define NS_COMMANDLINE_CID \
{ 0x23bcc750, 0xdc20, 0x460b, { 0xb2, 0xd4, 0x74, 0xd8, 0xf5, 0x8d, 0x36, 0x15 } } { 0x23bcc750, 0xdc20, 0x460b, { 0xb2, 0xd4, 0x74, 0xd8, 0xf5, 0x8d, 0x36, 0x15 } }
class nsCommandLine : public nsICommandLineRunner class nsCommandLine MOZ_FINAL : public nsICommandLineRunner
{ {
public: public:
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -7,11 +7,12 @@
#define COMPONENTS_CTYPES_H #define COMPONENTS_CTYPES_H
#include "nsIXPCScriptable.h" #include "nsIXPCScriptable.h"
#include "mozilla/Attributes.h"
namespace mozilla { namespace mozilla {
namespace ctypes { namespace ctypes {
class Module : public nsIXPCScriptable class Module MOZ_FINAL : public nsIXPCScriptable
{ {
public: public:
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -7,11 +7,12 @@
#define COMPONENTS_PERFMEASUREMENT_H #define COMPONENTS_PERFMEASUREMENT_H
#include "nsIXPCScriptable.h" #include "nsIXPCScriptable.h"
#include "mozilla/Attributes.h"
namespace mozilla { namespace mozilla {
namespace jsperf { namespace jsperf {
class Module : public nsIXPCScriptable class Module MOZ_FINAL : public nsIXPCScriptable
{ {
public: public:
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -7,11 +7,12 @@
#define COMPONENTS_REFLECT_H #define COMPONENTS_REFLECT_H
#include "nsIXPCScriptable.h" #include "nsIXPCScriptable.h"
#include "mozilla/Attributes.h"
namespace mozilla { namespace mozilla {
namespace reflect { namespace reflect {
class Module : public nsIXPCScriptable class Module MOZ_FINAL : public nsIXPCScriptable
{ {
public: public:
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -13,6 +13,7 @@
#include "nsINativeAppSupport.h" #include "nsINativeAppSupport.h"
#include "nsIAppShell.h" #include "nsIAppShell.h"
#include "mozilla/Attributes.h"
#if defined(XP_WIN) #if defined(XP_WIN)
//XPerf-backed probes //XPerf-backed probes
@ -28,10 +29,10 @@ struct PLEvent;
{ 0x7dd4d320, 0xc84b, 0x4624, { 0x8d, 0x45, 0x7b, 0xb9, 0xb2, 0x35, 0x69, 0x77 } } { 0x7dd4d320, 0xc84b, 0x4624, { 0x8d, 0x45, 0x7b, 0xb9, 0xb2, 0x35, 0x69, 0x77 } }
class nsAppStartup : public nsIAppStartup, class nsAppStartup MOZ_FINAL : public nsIAppStartup,
public nsIWindowCreator2, public nsIWindowCreator2,
public nsIObserver, public nsIObserver,
public nsSupportsWeakReference public nsSupportsWeakReference
{ {
public: public:
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -25,6 +25,7 @@
#include "mozilla/Mutex.h" #include "mozilla/Mutex.h"
#include "mozilla/FileUtils.h" #include "mozilla/FileUtils.h"
#include "mozilla/Preferences.h" #include "mozilla/Preferences.h"
#include "mozilla/Attributes.h"
namespace { namespace {
@ -85,7 +86,7 @@ AutoHashtable<EntryType>::ReflectIntoJS(ReflectEntryFunc entryFunc,
return num == this->Count(); return num == this->Count();
} }
class TelemetryImpl : public nsITelemetry class TelemetryImpl MOZ_FINAL : public nsITelemetry
{ {
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
NS_DECL_NSITELEMETRY NS_DECL_NSITELEMETRY

Просмотреть файл

@ -7,11 +7,12 @@
#define COMPONENTS_JSINSPECTOR_H #define COMPONENTS_JSINSPECTOR_H
#include "nsIJSInspector.h" #include "nsIJSInspector.h"
#include "mozilla/Attributes.h"
namespace mozilla { namespace mozilla {
namespace jsinspector { namespace jsinspector {
class nsJSInspector : public nsIJSInspector class nsJSInspector MOZ_FINAL : public nsIJSInspector
{ {
public: public:
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -15,8 +15,9 @@
#include "nsISupportsPrimitives.h" #include "nsISupportsPrimitives.h"
#include "nsIURI.h" #include "nsIURI.h"
#include "nsObjCExceptions.h" #include "nsObjCExceptions.h"
#include "mozilla/Attributes.h"
class nsOSXSystemProxySettings : public nsISystemProxySettings { class nsOSXSystemProxySettings MOZ_FINAL : public nsISystemProxySettings {
public: public:
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
NS_DECL_NSISYSTEMPROXYSETTINGS NS_DECL_NSISYSTEMPROXYSETTINGS