From 3360fe9dd4d6809901b5220e3e74f414165dfdfc Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 19 Jun 2012 23:24:24 -0400 Subject: [PATCH] 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 (browser parts); r=jrmuizel --- browser/components/dirprovider/DirectoryProvider.h | 5 +++-- browser/components/feeds/src/nsFeedSniffer.h | 4 +++- .../privatebrowsing/src/nsPrivateBrowsingServiceWrapper.h | 5 +++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/browser/components/dirprovider/DirectoryProvider.h b/browser/components/dirprovider/DirectoryProvider.h index 52db7664f44c..bf2318f25724 100644 --- a/browser/components/dirprovider/DirectoryProvider.h +++ b/browser/components/dirprovider/DirectoryProvider.h @@ -9,6 +9,7 @@ #include "nsComponentManagerUtils.h" #include "nsISimpleEnumerator.h" #include "nsIFile.h" +#include "mozilla/Attributes.h" #define NS_BROWSERDIRECTORYPROVIDER_CONTRACTID \ "@mozilla.org/browser/directory-provider;1" @@ -16,7 +17,7 @@ namespace mozilla { namespace browser { -class DirectoryProvider : public nsIDirectoryServiceProvider2 +class DirectoryProvider MOZ_FINAL : public nsIDirectoryServiceProvider2 { public: NS_DECL_ISUPPORTS @@ -24,7 +25,7 @@ public: NS_DECL_NSIDIRECTORYSERVICEPROVIDER2 private: - class AppendingEnumerator : public nsISimpleEnumerator + class AppendingEnumerator MOZ_FINAL : public nsISimpleEnumerator { public: NS_DECL_ISUPPORTS diff --git a/browser/components/feeds/src/nsFeedSniffer.h b/browser/components/feeds/src/nsFeedSniffer.h index 8f8c6dcdcc86..8cfcab53d38d 100644 --- a/browser/components/feeds/src/nsFeedSniffer.h +++ b/browser/components/feeds/src/nsFeedSniffer.h @@ -7,8 +7,10 @@ #include "nsIContentSniffer.h" #include "nsIStreamListener.h" #include "nsStringAPI.h" +#include "mozilla/Attributes.h" -class nsFeedSniffer : public nsIContentSniffer, nsIStreamListener +class nsFeedSniffer MOZ_FINAL : public nsIContentSniffer, + nsIStreamListener { public: NS_DECL_ISUPPORTS diff --git a/browser/components/privatebrowsing/src/nsPrivateBrowsingServiceWrapper.h b/browser/components/privatebrowsing/src/nsPrivateBrowsingServiceWrapper.h index 144689c53996..39639afbcbbf 100644 --- a/browser/components/privatebrowsing/src/nsPrivateBrowsingServiceWrapper.h +++ b/browser/components/privatebrowsing/src/nsPrivateBrowsingServiceWrapper.h @@ -5,11 +5,12 @@ #include "nsCOMPtr.h" #include "nsIPrivateBrowsingService.h" #include "nsIObserver.h" +#include "mozilla/Attributes.h" class nsIJSContextStack; -class nsPrivateBrowsingServiceWrapper : public nsIPrivateBrowsingService, - public nsIObserver +class nsPrivateBrowsingServiceWrapper MOZ_FINAL : public nsIPrivateBrowsingService, + public nsIObserver { public: NS_DECL_ISUPPORTS