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 (uriloader parts); r=bzbarsky
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIWeakReference.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
#ifdef MOZ_LOGGING
|
||||
// Uncomment the next line to force logging on in release builds
|
||||
@@ -23,7 +24,7 @@
|
||||
|
||||
class nsDocumentOpenInfo;
|
||||
|
||||
class nsURILoader : public nsIURILoader
|
||||
class nsURILoader MOZ_FINAL : public nsIURILoader
|
||||
{
|
||||
public:
|
||||
NS_DECL_NSIURILOADER
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsIPrompt.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsExternalAppHandler;
|
||||
class nsIMIMEInfo;
|
||||
@@ -205,9 +206,9 @@ protected:
|
||||
* stored the data into. We create a handler every time we have to process
|
||||
* data using a helper app.
|
||||
*/
|
||||
class nsExternalAppHandler : public nsIStreamListener,
|
||||
public nsIHelperAppLauncher,
|
||||
public nsITimerCallback
|
||||
class nsExternalAppHandler MOZ_FINAL : public nsIStreamListener,
|
||||
public nsIHelperAppLauncher,
|
||||
public nsITimerCallback
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
@@ -12,11 +12,12 @@
|
||||
#include "nsString.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsIExternalProtocolService.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsIURI;
|
||||
|
||||
// protocol handlers need to support weak references if we want the netlib nsIOService to cache them.
|
||||
class nsExternalProtocolHandler : public nsIExternalProtocolHandler, public nsSupportsWeakReference
|
||||
class nsExternalProtocolHandler MOZ_FINAL : public nsIExternalProtocolHandler, public nsSupportsWeakReference
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsString.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsOfflineCacheUpdate;
|
||||
|
||||
@@ -34,9 +35,9 @@ namespace docshell {
|
||||
NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsIOfflineCacheUpdateObserver *aObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(aObserver); } \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetByteProgress(PRUint64 * _result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetByteProgress(_result); }
|
||||
|
||||
class OfflineCacheUpdateGlue : public nsSupportsWeakReference
|
||||
, public nsIOfflineCacheUpdate
|
||||
, public nsIOfflineCacheUpdateObserver
|
||||
class OfflineCacheUpdateGlue MOZ_FINAL : public nsSupportsWeakReference
|
||||
, public nsIOfflineCacheUpdate
|
||||
, public nsIOfflineCacheUpdateObserver
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "prlog.h"
|
||||
#include "nsIAsyncVerifyRedirectCallback.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
@@ -88,9 +89,9 @@ DropReferenceFromURL(nsIURI * aURI)
|
||||
// nsManifestCheck
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class nsManifestCheck : public nsIStreamListener
|
||||
, public nsIChannelEventSink
|
||||
, public nsIInterfaceRequestor
|
||||
class nsManifestCheck MOZ_FINAL : public nsIStreamListener
|
||||
, public nsIChannelEventSink
|
||||
, public nsIInterfaceRequestor
|
||||
{
|
||||
public:
|
||||
nsManifestCheck(nsOfflineCacheUpdate *aUpdate,
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "nsTArray.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsICryptoHash.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsOfflineCacheUpdate;
|
||||
|
||||
@@ -182,10 +183,10 @@ public:
|
||||
virtual nsresult UpdateFinished(nsOfflineCacheUpdate *aUpdate) = 0;
|
||||
};
|
||||
|
||||
class nsOfflineCacheUpdate : public nsIOfflineCacheUpdate
|
||||
, public nsIOfflineCacheUpdateObserver
|
||||
, public nsIRunnable
|
||||
, public nsOfflineCacheUpdateOwner
|
||||
class nsOfflineCacheUpdate MOZ_FINAL : public nsIOfflineCacheUpdate
|
||||
, public nsIOfflineCacheUpdateObserver
|
||||
, public nsIRunnable
|
||||
, public nsOfflineCacheUpdateOwner
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
@@ -293,10 +294,10 @@ private:
|
||||
PRUint64 mByteProgress;
|
||||
};
|
||||
|
||||
class nsOfflineCacheUpdateService : public nsIOfflineCacheUpdateService
|
||||
, public nsIObserver
|
||||
, public nsOfflineCacheUpdateOwner
|
||||
, public nsSupportsWeakReference
|
||||
class nsOfflineCacheUpdateService MOZ_FINAL : public nsIOfflineCacheUpdateService
|
||||
, public nsIObserver
|
||||
, public nsOfflineCacheUpdateOwner
|
||||
, public nsSupportsWeakReference
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "prlog.h"
|
||||
#include "nsIAsyncVerifyRedirectCallback.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
@@ -78,8 +79,8 @@ private:
|
||||
// nsOfflineCachePendingUpdate
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class nsOfflineCachePendingUpdate : public nsIWebProgressListener
|
||||
, public nsSupportsWeakReference
|
||||
class nsOfflineCachePendingUpdate MOZ_FINAL : public nsIWebProgressListener
|
||||
, public nsSupportsWeakReference
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "plstr.h"
|
||||
#include "nsIAsyncVerifyRedirectCallback.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
@@ -66,7 +67,7 @@ PRTimeToSeconds(PRTime t_usec)
|
||||
//-----------------------------------------------------------------------------
|
||||
// nsPrefetchQueueEnumerator
|
||||
//-----------------------------------------------------------------------------
|
||||
class nsPrefetchQueueEnumerator : public nsISimpleEnumerator
|
||||
class nsPrefetchQueueEnumerator MOZ_FINAL : public nsISimpleEnumerator
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsPrefetchService;
|
||||
class nsPrefetchListener;
|
||||
@@ -27,10 +28,10 @@ class nsPrefetchNode;
|
||||
// nsPrefetchService
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class nsPrefetchService : public nsIPrefetchService
|
||||
, public nsIWebProgressListener
|
||||
, public nsIObserver
|
||||
, public nsSupportsWeakReference
|
||||
class nsPrefetchService MOZ_FINAL : public nsIPrefetchService
|
||||
, public nsIWebProgressListener
|
||||
, public nsIObserver
|
||||
, public nsSupportsWeakReference
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
@@ -81,10 +82,10 @@ private:
|
||||
// nsPrefetchNode
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class nsPrefetchNode : public nsIDOMLoadStatus
|
||||
, public nsIStreamListener
|
||||
, public nsIInterfaceRequestor
|
||||
, public nsIChannelEventSink
|
||||
class nsPrefetchNode MOZ_FINAL : public nsIDOMLoadStatus
|
||||
, public nsIStreamListener
|
||||
, public nsIInterfaceRequestor
|
||||
, public nsIChannelEventSink
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
Reference in New Issue
Block a user