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

This commit is contained in:
Ehsan Akhgari 2012-06-19 23:27:32 -04:00
parent 7fbd578f64
commit 8e4039f7a3
3 changed files with 8 additions and 5 deletions

View File

@ -9,8 +9,9 @@
#include "nsIStreamLoader.h"
#include "nsStringAPI.h"
#include "mozilla/Attributes.h"
class nsAlertsImageLoadListener : public nsIStreamLoaderObserver
class nsAlertsImageLoadListener MOZ_FINAL : public nsIStreamLoaderObserver
{
public:
nsAlertsImageLoadListener(const nsAString &aName,

View File

@ -19,6 +19,7 @@
#include "nsPIPlacesDatabase.h"
#include "nsIObserver.h"
#include "prinrval.h"
#include "mozilla/Attributes.h"
#define TOPIC_FRECENCY_UPDATED "places-frecency-updated"
#define WAITFORTOPIC_TIMEOUT_SECONDS 5
@ -95,7 +96,7 @@ void do_test_finished();
/**
* Spins current thread until a topic is received.
*/
class WaitForTopicSpinner : public nsIObserver
class WaitForTopicSpinner MOZ_FINAL : public nsIObserver
{
public:
NS_DECL_ISUPPORTS
@ -299,7 +300,7 @@ do_get_lastVisit(PRInt64 placeId, VisitRecord& result)
static const char TOPIC_PROFILE_CHANGE[] = "profile-before-change";
static const char TOPIC_PLACES_CONNECTION_CLOSED[] = "places-connection-closed";
class WaitForConnectionClosed : public nsIObserver
class WaitForConnectionClosed MOZ_FINAL : public nsIObserver
{
nsRefPtr<WaitForTopicSpinner> mSpinner;
public:

View File

@ -8,6 +8,7 @@
#include "nsIBrowserHistory.h"
#include "nsIPrefService.h"
#include "nsIPrefBranch.h"
#include "mozilla/Attributes.h"
#include "mock_Link.h"
using namespace mozilla::dom;
@ -46,7 +47,7 @@ new_test_uri()
return testURI.forget();
}
class VisitURIObserver : public nsIObserver
class VisitURIObserver MOZ_FINAL : public nsIObserver
{
public:
NS_DECL_ISUPPORTS
@ -282,7 +283,7 @@ namespace test_observer_topic_dispatched_helpers {
#define URI_VISITED "visited"
#define URI_NOT_VISITED "not visited"
#define URI_VISITED_RESOLUTION_TOPIC "visited-status-resolution"
class statusObserver : public nsIObserver
class statusObserver MOZ_FINAL : public nsIObserver
{
public:
NS_DECL_ISUPPORTS