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 (widget parts); r=roc

--HG--
extra : rebase_source : 36430dcdd81a80d8ee2cd21f698a9289f327e2b6
This commit is contained in:
Ehsan Akhgari 2012-06-18 21:28:00 -04:00
parent d40ed1738a
commit 32d9a6d919
4 changed files with 8 additions and 4 deletions

View File

@ -20,6 +20,7 @@
#include "nsIScreenManager.h"
#include "nsThreadUtils.h"
#include "nsWeakReference.h"
#include "mozilla/Attributes.h"
class gfxASurface;
@ -220,7 +221,7 @@ public:
NS_IMETHOD SetRotation(PRUint32 aRotation) MOZ_OVERRIDE;
};
class PuppetScreenManager : public nsIScreenManager
class PuppetScreenManager MOZ_FINAL : public nsIScreenManager
{
public:
PuppetScreenManager();

View File

@ -26,6 +26,7 @@
#include "npapi.h"
#include "base/thread.h"
#include "prenv.h"
#include "mozilla/Attributes.h"
#ifdef DEBUG
#include "nsIObserver.h"
@ -1489,7 +1490,7 @@ static void debug_SetCachedBoolPref(const char * aPrefName,bool aValue)
}
//////////////////////////////////////////////////////////////
class Debug_PrefObserver : public nsIObserver {
class Debug_PrefObserver MOZ_FINAL : public nsIObserver {
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIOBSERVER

View File

@ -10,6 +10,7 @@
#include "nsIPrivateBrowsingService.h"
#include "nsWeakReference.h"
#include "nsCOMPtr.h"
#include "mozilla/Attributes.h"
class nsITransferable;
@ -20,8 +21,8 @@ class nsITransferable;
// nsIClipboard::SetData implementation before starting to use the
// nsITransferable object in any way.
class nsClipboardPrivacyHandler : public nsIObserver,
public nsSupportsWeakReference
class nsClipboardPrivacyHandler MOZ_FINAL : public nsIObserver,
public nsSupportsWeakReference
{
public:

View File

@ -42,6 +42,7 @@ class nsNativeTheme : public nsITimerCallback
};
nsNativeTheme();
virtual ~nsNativeTheme() {}
// Returns the content state (hover, focus, etc), see nsEventStateManager.h
nsEventStates GetContentState(nsIFrame* aFrame, PRUint8 aWidgetType);