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 (remaining XPCOM parts); r=bsmedberg

--HG--
extra : rebase_source : 578d3ab1fefa2f2268069790a6a75db4580991b2
This commit is contained in:
Ehsan Akhgari 2012-06-12 23:08:53 -04:00
parent ca2007e6f0
commit bcc9fdc523
3 changed files with 9 additions and 6 deletions

View File

@ -12,6 +12,7 @@
#include "nsClassHashtable.h"
#include "nsICategoryManager.h"
#include "mozilla/Mutex.h"
#include "mozilla/Attributes.h"
#define NS_CATEGORYMANAGER_CLASSNAME "Category Manager"
@ -92,7 +93,7 @@ private:
*
* This implementation is thread-safe.
*/
class nsCategoryManager
class nsCategoryManager MOZ_FINAL
: public nsICategoryManager
{
public:

View File

@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsThreadUtils.h"
#include "mozilla/Attributes.h"
#ifdef MOZILLA_INTERNAL_API
# include "nsThreadManager.h"
@ -220,7 +221,7 @@ NS_ProcessNextEvent(nsIThread *thread, bool mayWait)
namespace {
class nsNameThreadRunnable : public nsIRunnable
class nsNameThreadRunnable MOZ_FINAL : public nsIRunnable
{
public:
nsNameThreadRunnable(const nsACString &name) : mName(name) { }

View File

@ -19,6 +19,7 @@
#include "nsCOMPtr.h"
#include "nsTArray.h"
#include "nsString.h"
#include "mozilla/Attributes.h"
#define IDLE_THREAD_TOPIC "thread-shutting-down"
@ -31,10 +32,10 @@ namespace mozilla {
* is created on the main thread then it will automatically join its thread on
* XPCOM shutdown using the Observer Service.
*/
class LazyIdleThread : public nsIThread,
public nsITimerCallback,
public nsIThreadObserver,
public nsIObserver
class LazyIdleThread MOZ_FINAL : public nsIThread,
public nsITimerCallback,
public nsIThreadObserver,
public nsIObserver
{
public:
NS_DECL_ISUPPORTS