Bug 1038200 - Fix the rest of the public refcounted destructors in widget/windows; r=bjacob
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 15 Jul 2014 16:37:58 -0400
changeset 208037 2e967076c3e6c2967a74f551ffdf0196cdfc8e84
parent 208036 9fe475d50fee328241f9cba64b2ef53d6f3f756c
child 208038 7e47b4b334473541fecb6955c358db81445d88c4
push id6561
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 21:23:20 +0000
treeherdermozilla-aurora@428d4d3c8588 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob
bugs1038200
milestone33.0a1
Bug 1038200 - Fix the rest of the public refcounted destructors in widget/windows; r=bjacob
widget/windows/nsClipboard.h
widget/windows/nsColorPicker.h
widget/windows/nsDeviceContextSpecWin.h
widget/windows/nsNativeThemeWin.h
widget/windows/nsPrintSettingsWin.h
widget/windows/nsScreenManagerWin.h
widget/windows/nsSound.h
widget/windows/nsWindow.h
--- a/widget/windows/nsClipboard.h
+++ b/widget/windows/nsClipboard.h
@@ -19,20 +19,20 @@ struct IDataObject;
 
 /**
  * Native Win32 Clipboard wrapper
  */
 
 class nsClipboard : public nsBaseClipboard,
                     public nsIObserver
 {
+  virtual ~nsClipboard();
 
 public:
   nsClipboard();
-  virtual ~nsClipboard();
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIObserver
   NS_DECL_NSIOBSERVER
 
   // nsIClipboard
   NS_IMETHOD HasDataMatchingFlavors(const char** aFlavorList, uint32_t aLength,
--- a/widget/windows/nsColorPicker.h
+++ b/widget/windows/nsColorPicker.h
@@ -31,19 +31,20 @@ private:
   nsCOMPtr<nsIWidget> mParentWidget;
   nsCOMPtr<nsIColorPickerShownCallback> mCallback;
   nsString mColor;
 };
 
 class nsColorPicker :
   public nsIColorPicker
 {
+  virtual ~nsColorPicker();
+
 public:
   nsColorPicker();
-  virtual ~nsColorPicker();
 
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD Init(nsIDOMWindow* parent, const nsAString& title,
                   const nsAString& aInitialColor);
   NS_IMETHOD Open(nsIColorPickerShownCallback* aCallback);
 
 protected:
--- a/widget/windows/nsDeviceContextSpecWin.h
+++ b/widget/windows/nsDeviceContextSpecWin.h
@@ -67,16 +67,17 @@ protected:
 };
 
 
 //-------------------------------------------------------------------------
 // Printer Enumerator
 //-------------------------------------------------------------------------
 class nsPrinterEnumeratorWin MOZ_FINAL : public nsIPrinterEnumerator
 {
+  ~nsPrinterEnumeratorWin();
+
 public:
   nsPrinterEnumeratorWin();
-  ~nsPrinterEnumeratorWin();
   NS_DECL_ISUPPORTS
   NS_DECL_NSIPRINTERENUMERATOR
 };
 
 #endif
--- a/widget/windows/nsNativeThemeWin.h
+++ b/widget/windows/nsNativeThemeWin.h
@@ -15,16 +15,18 @@
 #include <windows.h>
 #include "mozilla/TimeStamp.h"
 
 struct nsIntRect;
 struct nsIntSize;
 
 class nsNativeThemeWin : private nsNativeTheme,
                          public nsITheme {
+  virtual ~nsNativeThemeWin();
+
 public:
   typedef mozilla::TimeStamp TimeStamp;
   typedef mozilla::TimeDuration TimeDuration;
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // The nsITheme interface.
   NS_IMETHOD DrawWidgetBackground(nsRenderingContext* aContext,
@@ -70,17 +72,16 @@ public:
 
   bool ThemeNeedsComboboxDropmarker();
 
   virtual bool WidgetAppearanceDependsOnWindowFocus(uint8_t aWidgetType) MOZ_OVERRIDE;
 
   virtual bool ShouldHideScrollbars() MOZ_OVERRIDE;
 
   nsNativeThemeWin();
-  virtual ~nsNativeThemeWin();
 
 protected:
   HANDLE GetTheme(uint8_t aWidgetType);
   nsresult GetThemePartAndState(nsIFrame* aFrame, uint8_t aWidgetType,
                                 int32_t& aPart, int32_t& aState);
   nsresult ClassicGetThemePartAndState(nsIFrame* aFrame, uint8_t aWidgetType,
                                        int32_t& aPart, int32_t& aState, bool& aFocused);
   nsresult ClassicDrawWidgetBackground(nsRenderingContext* aContext,
--- a/widget/windows/nsPrintSettingsWin.h
+++ b/widget/windows/nsPrintSettingsWin.h
@@ -13,23 +13,24 @@
 
 
 //*****************************************************************************
 //***    nsPrintSettingsWin
 //*****************************************************************************
 class nsPrintSettingsWin : public nsPrintSettings,
                            public nsIPrintSettingsWin
 {
+  virtual ~nsPrintSettingsWin();
+
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIPRINTSETTINGSWIN
 
   nsPrintSettingsWin();
   nsPrintSettingsWin(const nsPrintSettingsWin& aPS);
-  virtual ~nsPrintSettingsWin();
 
   /**
    * Makes a new copy
    */
   virtual nsresult _Clone(nsIPrintSettings **_retval);
 
   /**
    * Assigns values
--- a/widget/windows/nsScreenManagerWin.h
+++ b/widget/windows/nsScreenManagerWin.h
@@ -26,22 +26,22 @@ public:
   HMONITOR mMon;
   nsCOMPtr<nsIScreen> mScreen;
 };
 
 class nsScreenManagerWin MOZ_FINAL : public nsIScreenManager
 {
 public:
   nsScreenManagerWin ( );
-  ~nsScreenManagerWin();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISCREENMANAGER
 
 private:
+  ~nsScreenManagerWin();
 
   nsIScreen* CreateNewScreenObject ( HMONITOR inScreen ) ;
 
   uint32_t mNumberOfScreens;
 
     // cache the screens to avoid the memory allocations
   nsAutoTArray<ScreenListItem, 8> mScreenList;
 
--- a/widget/windows/nsSound.h
+++ b/widget/windows/nsSound.h
@@ -14,24 +14,24 @@
 class nsIThread;
 
 class nsSound : public nsISound,
                 public nsIStreamLoaderObserver
 
 {
 public: 
   nsSound();
-  virtual ~nsSound();
   void ShutdownOldPlayerThread();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISOUND
   NS_DECL_NSISTREAMLOADEROBSERVER
 
 private:
+  virtual ~nsSound();
   void PurgeLastSound();
 
 private:
   uint8_t* mLastSound;
   nsCOMPtr<nsIThread> mPlayerThread;
 };
 
 #endif /* __nsSound_h__ */
--- a/widget/windows/nsWindow.h
+++ b/widget/windows/nsWindow.h
@@ -72,17 +72,16 @@ class nsWindow : public nsWindowBase
   typedef mozilla::TimeStamp TimeStamp;
   typedef mozilla::TimeDuration TimeDuration;
   typedef mozilla::widget::WindowHook WindowHook;
   typedef mozilla::widget::TaskbarWindowPreview TaskbarWindowPreview;
   typedef mozilla::widget::NativeKey NativeKey;
   typedef mozilla::widget::MSGResult MSGResult;
 public:
   nsWindow();
-  virtual ~nsWindow();
 
   NS_DECL_ISUPPORTS_INHERITED
 
   friend class nsWindowGfx;
 
   // nsWindowBase
   virtual void InitEvent(mozilla::WidgetGUIEvent& aEvent,
                          nsIntPoint* aPoint = nullptr) MOZ_OVERRIDE;
@@ -285,16 +284,17 @@ public:
 
   bool                    const DestroyCalled() { return mDestroyCalled; }
 
   virtual void GetPreferredCompositorBackends(nsTArray<mozilla::layers::LayersBackend>& aHints);
 
   virtual bool ShouldUseOffMainThreadCompositing();
 
 protected:
+  virtual ~nsWindow();
 
   virtual void WindowUsesOMTC() MOZ_OVERRIDE;
 
   // A magic number to identify the FAKETRACKPOINTSCROLLABLE window created
   // when the trackpoint hack is enabled.
   enum { eFakeTrackPointScrollableID = 0x46545053 };
 
   /**