Bug 1038210 - Fix the public destructors for refcounted classes in Windows only code in accessible; r=bjacob
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 15 Jul 2014 14:57:48 -0400
changeset 216150 57f5916f07fb29f3b7f8f25eb139f34db376127c
parent 216149 d5cbd531e89e7335a7d2c1a317aadc1bb8f6d592
child 216151 10ab5792cf434492ed0ae6a7ffec6f91d23c8ae3
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob
bugs1038210
milestone33.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 1038210 - Fix the public destructors for refcounted classes in Windows only code in accessible; r=bjacob
accessible/base/nsAccessibilityService.cpp
accessible/windows/msaa/ARIAGridAccessibleWrap.h
accessible/windows/msaa/AccessibleWrap.h
accessible/windows/msaa/ApplicationAccessibleWrap.h
accessible/windows/msaa/HTMLTableAccessibleWrap.h
accessible/windows/msaa/HyperTextAccessibleWrap.h
accessible/windows/msaa/ImageAccessibleWrap.h
accessible/windows/msaa/XULListboxAccessibleWrap.h
accessible/windows/msaa/XULTreeGridAccessibleWrap.h
--- a/accessible/base/nsAccessibilityService.cpp
+++ b/accessible/base/nsAccessibilityService.cpp
@@ -218,16 +218,18 @@ nsAccessibilityService::GetRootDocumentA
 }
 
 #ifdef XP_WIN
 static StaticAutoPtr<nsTArray<nsCOMPtr<nsIContent> > > sPendingPlugins;
 static StaticAutoPtr<nsTArray<nsCOMPtr<nsITimer> > > sPluginTimers;
 
 class PluginTimerCallBack MOZ_FINAL : public nsITimerCallback
 {
+  ~PluginTimerCallBack() {}
+
 public:
   PluginTimerCallBack(nsIContent* aContent) : mContent(aContent) {}
 
   NS_DECL_ISUPPORTS
 
   NS_IMETHODIMP Notify(nsITimer* aTimer) MOZ_FINAL
   {
     if (!mContent->IsInDoc())
--- a/accessible/windows/msaa/ARIAGridAccessibleWrap.h
+++ b/accessible/windows/msaa/ARIAGridAccessibleWrap.h
@@ -17,16 +17,18 @@ namespace a11y {
 
 /**
  * IA2 wrapper class for ARIAGridAccessible implementing IAccessibleTable and
  * IAccessibleTable2 interfaces.
  */
 class ARIAGridAccessibleWrap : public ARIAGridAccessible,
                                public ia2AccessibleTable
 {
+  ~ARIAGridAccessibleWrap() {}
+
 public:
   ARIAGridAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
     ARIAGridAccessible(aContent, aDoc), ia2AccessibleTable(this) {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
   // nsISupports
@@ -37,16 +39,18 @@ public:
 
 /**
  * IA2 wrapper class for ARIAGridCellAccessible implementing
  * IAccessibleTableCell interface.
  */
 class ARIAGridCellAccessibleWrap : public ARIAGridCellAccessible,
                                    public ia2AccessibleTableCell
 {
+  ~ARIAGridCellAccessibleWrap() {}
+
 public:
   ARIAGridCellAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
     ARIAGridCellAccessible(aContent, aDoc), ia2AccessibleTableCell(this) {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
   // nsISupports
--- a/accessible/windows/msaa/AccessibleWrap.h
+++ b/accessible/windows/msaa/AccessibleWrap.h
@@ -29,17 +29,16 @@ class AccessibleWrap : public Accessible
                        public ia2Accessible,
                        public ia2AccessibleComponent,
                        public ia2AccessibleHyperlink,
                        public ia2AccessibleValue
 {
 public: // construction, destruction
   AccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
     Accessible(aContent, aDoc) { }
-  virtual ~AccessibleWrap() { }
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   public: // IUnknown methods - see iunknown.h for documentation
     STDMETHODIMP QueryInterface(REFIID, void**);
 
   // Return the registered OLE class ID of this object's CfDataObj.
@@ -171,16 +170,17 @@ public: // construction, destruction
    */
   Accessible* GetXPAccessibleFor(const VARIANT& aVarChild);
 
   NS_IMETHOD GetNativeInterface(void **aOutAccessible);
 
   static IDispatch *NativeAccessible(nsIAccessible *aXPAccessible);
 
 protected:
+  virtual ~AccessibleWrap() { }
 
   /**
    * Creates ITypeInfo for LIBID_Accessibility if it's needed and returns it.
    */
   static ITypeInfo* GetTI(LCID lcid);
 
   static ITypeInfo* gTypeInfo;
 
--- a/accessible/windows/msaa/ApplicationAccessibleWrap.h
+++ b/accessible/windows/msaa/ApplicationAccessibleWrap.h
@@ -13,16 +13,18 @@
 #include "AccessibleApplication.h"
 
 namespace mozilla {
 namespace a11y {
  
 class ApplicationAccessibleWrap: public ApplicationAccessible,
                                  public IAccessibleApplication
 {
+  ~ApplicationAccessibleWrap() {}
+
 public:
   // nsISupporst
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsAccessible
   virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
 
   // IUnknown
--- a/accessible/windows/msaa/HTMLTableAccessibleWrap.h
+++ b/accessible/windows/msaa/HTMLTableAccessibleWrap.h
@@ -18,16 +18,18 @@ namespace a11y {
 
 /**
  * IA2 wrapper class for HTMLTableAccessible implementing IAccessibleTable
  * and IAccessibleTable2 interfaces.
  */
 class HTMLTableAccessibleWrap : public HTMLTableAccessible,
                                 public ia2AccessibleTable
 {
+  ~HTMLTableAccessibleWrap() {}
+
 public:
   HTMLTableAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
     HTMLTableAccessible(aContent, aDoc), ia2AccessibleTable(this)  {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
   // nsISupports
@@ -39,16 +41,18 @@ public:
 
 /**
  * IA2 wrapper class for HTMLTableCellAccessible implementing
  * IAccessibleTableCell interface.
  */
 class HTMLTableCellAccessibleWrap : public HTMLTableCellAccessible,
                                     public ia2AccessibleTableCell
 {
+  ~HTMLTableCellAccessibleWrap() {}
+
 public:
   HTMLTableCellAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
     HTMLTableCellAccessible(aContent, aDoc), ia2AccessibleTableCell(this) {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
   // nsISupports
@@ -60,16 +64,18 @@ public:
 
 /**
  * IA2 wrapper class for HTMLTableHeaderCellAccessible implementing
  * IAccessibleTableCell interface.
  */
 class HTMLTableHeaderCellAccessibleWrap : public HTMLTableHeaderCellAccessible,
                                           public ia2AccessibleTableCell
 {
+  ~HTMLTableHeaderCellAccessibleWrap() {}
+
 public:
   HTMLTableHeaderCellAccessibleWrap(nsIContent* aContent,
                                     DocAccessible* aDoc) :
     HTMLTableHeaderCellAccessible(aContent, aDoc), ia2AccessibleTableCell(this)
   {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
--- a/accessible/windows/msaa/HyperTextAccessibleWrap.h
+++ b/accessible/windows/msaa/HyperTextAccessibleWrap.h
@@ -32,16 +32,18 @@ public:
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
   virtual nsresult HandleAccEvent(AccEvent* aEvent);
 
 protected:
+  ~HyperTextAccessibleWrap() {}
+
   virtual nsresult GetModifiedText(bool aGetInsertedText, nsAString& aText,
                                    uint32_t *aStartOffset,
                                    uint32_t *aEndOffset);
 
   static StaticRefPtr<Accessible> sLastTextChangeAcc;
   static StaticAutoPtr<nsString> sLastTextChangeString;
   static bool sLastTextChangeWasInsert;
   static uint32_t sLastTextChangeStart;
--- a/accessible/windows/msaa/ImageAccessibleWrap.h
+++ b/accessible/windows/msaa/ImageAccessibleWrap.h
@@ -21,15 +21,18 @@ public:
   ImageAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
     ImageAccessible(aContent, aDoc) {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
+
+protected:
+  ~ImageAccessibleWrap() {}
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
 
--- a/accessible/windows/msaa/XULListboxAccessibleWrap.h
+++ b/accessible/windows/msaa/XULListboxAccessibleWrap.h
@@ -16,16 +16,18 @@ namespace a11y {
 
 /**
  * IA2 wrapper class for XULListboxAccessible class implementing
  * IAccessibleTable and IAccessibleTable2 interfaces.
  */
 class XULListboxAccessibleWrap : public XULListboxAccessible,
                                  public ia2AccessibleTable
 {
+  ~XULListboxAccessibleWrap() {}
+
 public:
   XULListboxAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
     XULListboxAccessible(aContent, aDoc), ia2AccessibleTable(this) {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
   // nsISupports
@@ -36,16 +38,18 @@ public:
 
 /**
  * IA2 wrapper class for XULListCellAccessible class, implements
  * IAccessibleTableCell interface.
  */
 class XULListCellAccessibleWrap : public XULListCellAccessible,
                                   public ia2AccessibleTableCell
 {
+  ~XULListCellAccessibleWrap() {}
+
 public:
   XULListCellAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
     XULListCellAccessible(aContent, aDoc), ia2AccessibleTableCell(this) {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
   // nsISupports
--- a/accessible/windows/msaa/XULTreeGridAccessibleWrap.h
+++ b/accessible/windows/msaa/XULTreeGridAccessibleWrap.h
@@ -16,16 +16,18 @@ namespace a11y {
 
 /**
  * IA2 wrapper class for XULTreeGridAccessible class implementing
  * IAccessibleTable and IAccessibleTable2 interfaces.
  */
 class XULTreeGridAccessibleWrap : public XULTreeGridAccessible,
                                   public ia2AccessibleTable
 {
+  ~XULTreeGridAccessibleWrap() {}
+
 public:
   XULTreeGridAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc,
                             nsTreeBodyFrame* aTree) :
     XULTreeGridAccessible(aContent, aDoc, aTree), ia2AccessibleTable(this) {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
@@ -37,16 +39,18 @@ public:
 
 /**
  * IA2 wrapper class for XULTreeGridCellAccessible class, implements
  * IAccessibleTableCell interface.
  */
 class XULTreeGridCellAccessibleWrap : public XULTreeGridCellAccessible,
                                       public ia2AccessibleTableCell
 {
+  ~XULTreeGridCellAccessibleWrap() {}
+
 public:
   XULTreeGridCellAccessibleWrap(nsIContent* aContent,
                                 DocAccessible* aDoc,
                                 XULTreeGridRowAccessible* aRowAcc,
                                 nsITreeBoxObject* aTree,
                                 nsITreeView* aTreeView,
                                 int32_t aRow, nsITreeColumn* aColumn) :
     XULTreeGridCellAccessible(aContent, aDoc, aRowAcc, aTree, aTreeView, aRow,