Bug 1038164 - Give some classes in WinUtils.h private destructors; r=bjacob
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 15 Jul 2014 14:56:01 -0400
changeset 215025 dce91a62ea3e3813a6bc7d3d3139737bf6c4dc3b
parent 215024 32d47282044f0adfe23c8f510900f3c21cebb7d3
child 215026 9beef470de57e8b24cb8869147c1fedf274c280b
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob
bugs1038164
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 1038164 - Give some classes in WinUtils.h private destructors; r=bjacob
widget/windows/WinUtils.h
--- a/widget/windows/WinUtils.h
+++ b/widget/windows/WinUtils.h
@@ -18,16 +18,17 @@
 #include "nsIRunnable.h"
 #include "nsICryptoHash.h"
 #ifdef MOZ_PLACES
 #include "nsIFaviconService.h"
 #endif
 #include "nsIDownloader.h"
 #include "nsIURI.h"
 #include "nsIWidget.h"
+#include "nsIThread.h"
 
 #include "mozilla/Attributes.h"
 
 /**
  * NS_INLINE_DECL_IUNKNOWN_REFCOUNTING should be used for defining and
  * implementing AddRef() and Release() of IUnknown interface.
  * This depends on xpcom/glue/nsISupportsImpl.h.
  */
@@ -62,17 +63,16 @@ protected:                              
   nsAutoRefCnt mRefCnt;                                                       \
   NS_DECL_OWNINGTHREAD                                                        \
 public:
 
 class nsWindow;
 class nsWindowBase;
 struct KeyPair;
 struct nsIntRect;
-class nsIThread;
 
 namespace mozilla {
 namespace widget {
 
 // More complete QS definitions for MsgWaitForMultipleObjects() and
 // GetQueueStatus() that include newer win8 specific defines.
 
 #ifndef QS_RAWINPUT
@@ -391,16 +391,18 @@ public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIFAVICONDATACALLBACK
   
   AsyncFaviconDataReady(nsIURI *aNewURI, 
                         nsCOMPtr<nsIThread> &aIOThread, 
                         const bool aURLShortcut);
   nsresult OnFaviconDataNotAvailable(void);
 private:
+  ~AsyncFaviconDataReady() {}
+
   nsCOMPtr<nsIURI> mNewURI;
   nsCOMPtr<nsIThread> mIOThread;
   const bool mURLShortcut;
 };
 #endif
 
 /**
   * Asynchronously tries add the list to the build
@@ -412,19 +414,20 @@ public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
 
   // Warning: AsyncEncodeAndWriteIcon assumes ownership of the aData buffer passed in
   AsyncEncodeAndWriteIcon(const nsAString &aIconPath,
                           uint8_t *aData, uint32_t aDataLen, uint32_t aStride,
                           uint32_t aWidth, uint32_t aHeight,
                           const bool aURLShortcut);
+
+private:
   virtual ~AsyncEncodeAndWriteIcon();
 
-private:
   nsAutoString mIconPath;
   nsAutoArrayPtr<uint8_t> mBuffer;
   HMODULE sDwmDLL;
   uint32_t mBufferLength;
   uint32_t mStride;
   uint32_t mWidth;
   uint32_t mHeight;
 };
@@ -432,31 +435,34 @@ private:
 
 class AsyncDeleteIconFromDisk : public nsIRunnable
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
 
   AsyncDeleteIconFromDisk(const nsAString &aIconPath);
+
+private:
   virtual ~AsyncDeleteIconFromDisk();
 
-private:
   nsAutoString mIconPath;
 };
 
 class AsyncDeleteAllFaviconsFromDisk : public nsIRunnable
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
 
   AsyncDeleteAllFaviconsFromDisk(bool aIgnoreRecent = false);
+
+private:
   virtual ~AsyncDeleteAllFaviconsFromDisk();
-private:
+
   int32_t mIcoNoDeleteSeconds;
   bool mIgnoreRecent;
 };
 
 class FaviconHelper
 {
 public:
   static const char kJumpListCacheDir[];