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 (more dom parts); r=bzbarsky
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 18 Jun 2012 21:21:14 -0400
changeset 99737 9d826056332b34245f19a93a1a07281847711114
parent 99736 e82037b16e21f595923a895c7d99f1f905ebf82e
child 99738 4708cba2757d92dded4db298c696d8e341948009
push id1729
push userlsblakk@mozilla.com
push dateMon, 16 Jul 2012 20:02:43 +0000
treeherdermozilla-aurora@f4e75e148951 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs758992
milestone16.0a1
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 (more dom parts); r=bzbarsky
dom/devicestorage/nsDeviceStorage.cpp
dom/sms/src/fallback/SmsDatabaseService.h
--- a/dom/devicestorage/nsDeviceStorage.cpp
+++ b/dom/devicestorage/nsDeviceStorage.cpp
@@ -12,22 +12,23 @@
 #include "nsDOMBlobBuilder.h"
 #include "nsNetUtil.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsIContentPermissionPrompt.h"
 #include "nsIPrincipal.h"
 #include "mozilla/Preferences.h"
 #include "nsJSUtils.h"
 #include "DictionaryHelpers.h"
+#include "mozilla/Attributes.h"
 
 using namespace mozilla::dom;
 
 #include "nsDirectoryServiceDefs.h"
 
-class DeviceStorageFile : public nsISupports {
+class DeviceStorageFile MOZ_FINAL : public nsISupports {
 public:
 
   nsCOMPtr<nsIFile> mFile;
   nsString mPath;
 
   DeviceStorageFile(nsIFile* aFile, const nsAString& aPath)
   : mPath(aPath)
   {
--- a/dom/sms/src/fallback/SmsDatabaseService.h
+++ b/dom/sms/src/fallback/SmsDatabaseService.h
@@ -2,22 +2,23 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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_dom_sms_SmsDatabaseService_h
 #define mozilla_dom_sms_SmsDatabaseService_h
 
 #include "nsISmsDatabaseService.h"
+#include "mozilla/Attributes.h"
 
 namespace mozilla {
 namespace dom {
 namespace sms {
 
-class SmsDatabaseService : public nsISmsDatabaseService
+class SmsDatabaseService MOZ_FINAL : public nsISmsDatabaseService
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSISMSDATABASESERVICE
 };
 
 } // namespace sms
 } // namespace dom