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

--HG--
extra : rebase_source : 98c2cd6dce6c45173693a11a618cc7b94fb69595
This commit is contained in:
Ehsan Akhgari 2012-07-23 17:26:48 -04:00
Родитель 4e23a5cb51
Коммит 0b78f85d7c
3 изменённых файлов: 7 добавлений и 4 удалений

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

@ -25,6 +25,7 @@
#include "nsAutoPtr.h" #include "nsAutoPtr.h"
#include "nsIMutableArray.h" #include "nsIMutableArray.h"
#include "nsTArray.h" #include "nsTArray.h"
#include "mozilla/Attributes.h"
#include "nsWildCard.h" #include "nsWildCard.h"
@ -34,7 +35,7 @@ class nsIDOMDataTransfer;
{ 0x91, 0x10, 0x81, 0x46, 0x61, 0x4c, 0xa7, 0xf0 } } { 0x91, 0x10, 0x81, 0x46, 0x61, 0x4c, 0xa7, 0xf0 } }
#define NS_FILECOMPLETE_CONTRACTID "@mozilla.org/autocomplete/search;1?name=file" #define NS_FILECOMPLETE_CONTRACTID "@mozilla.org/autocomplete/search;1?name=file"
class nsFileResult : public nsIAutoCompleteResult class nsFileResult MOZ_FINAL : public nsIAutoCompleteResult
{ {
public: public:
// aSearchString is the text typed into the autocomplete widget // aSearchString is the text typed into the autocomplete widget
@ -169,7 +170,7 @@ NS_IMETHODIMP nsFileResult::RemoveValueAt(PRInt32 rowIndex, bool removeFromDb)
return NS_OK; return NS_OK;
} }
class nsFileComplete : public nsIAutoCompleteSearch class nsFileComplete MOZ_FINAL : public nsIAutoCompleteSearch
{ {
public: public:
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

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

@ -14,8 +14,9 @@
#include "nsInterfaceHashtable.h" #include "nsInterfaceHashtable.h"
#include "nsXRemoteService.h" #include "nsXRemoteService.h"
#include "mozilla/Attributes.h"
class nsGTKRemoteService : public nsXRemoteService class nsGTKRemoteService MOZ_FINAL : public nsXRemoteService
{ {
public: public:
// We will be a static singleton, so don't use the ordinary methods. // We will be a static singleton, so don't use the ordinary methods.

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

@ -17,8 +17,9 @@
#include "nsISupportsPrimitives.h" #include "nsISupportsPrimitives.h"
#include "nsIGSettingsService.h" #include "nsIGSettingsService.h"
#include "nsInterfaceHashtable.h" #include "nsInterfaceHashtable.h"
#include "mozilla/Attributes.h"
class nsUnixSystemProxySettings : public nsISystemProxySettings { class nsUnixSystemProxySettings MOZ_FINAL : public nsISystemProxySettings {
public: public:
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
NS_DECL_NSISYSTEMPROXYSETTINGS NS_DECL_NSISYSTEMPROXYSETTINGS