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/places); r=mak
authorDavid Zbarsky <dzbarsky@gmail.com>
Thu, 12 Jul 2012 14:07:50 -0400
changeset 99096 67e09e165ce691bc439ad7a79ac2ca461c32e612
parent 99095 75657697cfb504161e27f7a4e1cb4406d192e076
child 99097 6091c6a6f4b24789c75a94d146dc1e950cfc8fb6
push id23102
push userryanvm@gmail.com
push dateFri, 13 Jul 2012 00:46:37 +0000
treeherdermozilla-central@6489be1890c0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs758992
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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/places); r=mak
toolkit/components/places/PlaceInfo.h
toolkit/components/places/VisitInfo.h
--- a/toolkit/components/places/PlaceInfo.h
+++ b/toolkit/components/places/PlaceInfo.h
@@ -3,25 +3,26 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_places_PlaceInfo_h__
 #define mozilla_places_PlaceInfo_h__
 
 #include "mozIAsyncHistory.h"
 #include "nsString.h"
 #include "nsAutoPtr.h"
+#include "mozilla/Attributes.h"
 
 class nsIURI;
 class mozIVisitInfo;
 
 namespace mozilla {
 namespace places {
 
 
-class PlaceInfo : public mozIPlaceInfo
+class PlaceInfo MOZ_FINAL : public mozIPlaceInfo
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_MOZIPLACEINFO
 
   typedef nsTArray< nsCOMPtr<mozIVisitInfo> > VisitsArray;
 
   PlaceInfo(PRInt64 aId, const nsCString& aGUID, already_AddRefed<nsIURI> aURI,
--- a/toolkit/components/places/VisitInfo.h
+++ b/toolkit/components/places/VisitInfo.h
@@ -2,23 +2,24 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_places_VisitInfo_h__
 #define mozilla_places_VisitInfo_h__
 
 #include "mozIAsyncHistory.h"
 #include "nsAutoPtr.h"
+#include "mozilla/Attributes.h"
 
 class nsIURI;
 
 namespace mozilla {
 namespace places {
 
-class VisitInfo : public mozIVisitInfo
+class VisitInfo MOZ_FINAL : public mozIVisitInfo
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_MOZIVISITINFO
 
   VisitInfo(PRInt64 aVisitId, PRTime aVisitDate, PRUint32 aTransitionType,
             already_AddRefed<nsIURI> aReferrer, PRInt64 aSessionId);