Bug 884061 - Part 3g: Use NS_DECL_THREADSAFE_ISUPPORTS in embedding/, r=bsmedberg
authorJoshua Cranmer <Pidgeot18@gmail.com>
Thu, 18 Jul 2013 21:22:23 -0500
changeset 151890 c073457f6b02d0e1d383f9897befe585fdbc2981
parent 151889 8ba67ee6a81d06211c8516b6d3b12c16f584efb4
child 151891 0f38536304e145cfc27719e11e0bb78dd08993d7
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs884061
milestone25.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 884061 - Part 3g: Use NS_DECL_THREADSAFE_ISUPPORTS in embedding/, r=bsmedberg
embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
embedding/components/printingui/src/mac/nsPrintProgress.cpp
embedding/components/printingui/src/mac/nsPrintProgress.h
embedding/components/printingui/src/os2/nsPrintProgress.cpp
embedding/components/printingui/src/os2/nsPrintProgress.h
embedding/components/printingui/src/unixshared/nsPrintProgress.cpp
embedding/components/printingui/src/unixshared/nsPrintProgress.h
embedding/components/printingui/src/win/nsPrintProgress.cpp
embedding/components/printingui/src/win/nsPrintProgress.h
--- a/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
+++ b/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
@@ -989,26 +989,26 @@ nsDocShellTreeOwner::GetOwnerRequestor()
 ///////////////////////////////////////////////////////////////////////////////
 // DefaultTooltipTextProvider
 
 class DefaultTooltipTextProvider MOZ_FINAL : public nsITooltipTextProvider
 {
 public:
     DefaultTooltipTextProvider();
 
-    NS_DECL_ISUPPORTS
+    NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSITOOLTIPTEXTPROVIDER
     
 protected:
     nsCOMPtr<nsIAtom>   mTag_dialog;
     nsCOMPtr<nsIAtom>   mTag_dialogheader;
     nsCOMPtr<nsIAtom>   mTag_window;
 };
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(DefaultTooltipTextProvider, nsITooltipTextProvider)
+NS_IMPL_ISUPPORTS1(DefaultTooltipTextProvider, nsITooltipTextProvider)
 
 DefaultTooltipTextProvider::DefaultTooltipTextProvider()
 {
     // There are certain element types which we don't want to use
     // as tool tip text. 
     mTag_dialog       = do_GetAtom("dialog");
     mTag_dialogheader = do_GetAtom("dialogheader");
     mTag_window       = do_GetAtom("window");   
--- a/embedding/components/printingui/src/mac/nsPrintProgress.cpp
+++ b/embedding/components/printingui/src/mac/nsPrintProgress.cpp
@@ -6,18 +6,18 @@
 #include "nsPrintProgress.h"
 
 #include "nsIBaseWindow.h"
 #include "nsISupportsArray.h"
 #include "nsXPCOM.h"
 #include "nsISupportsPrimitives.h"
 #include "nsIComponentManager.h"
 
-NS_IMPL_THREADSAFE_ADDREF(nsPrintProgress)
-NS_IMPL_THREADSAFE_RELEASE(nsPrintProgress)
+NS_IMPL_ADDREF(nsPrintProgress)
+NS_IMPL_RELEASE(nsPrintProgress)
 
 NS_INTERFACE_MAP_BEGIN(nsPrintProgress)
    NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIPrintStatusFeedback)
    NS_INTERFACE_MAP_ENTRY(nsIPrintProgress)
    NS_INTERFACE_MAP_ENTRY(nsIPrintStatusFeedback)
    NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
 NS_INTERFACE_MAP_END_THREADSAFE
 
--- a/embedding/components/printingui/src/mac/nsPrintProgress.h
+++ b/embedding/components/printingui/src/mac/nsPrintProgress.h
@@ -13,17 +13,17 @@
 #include "nsIDOMWindow.h"
 #include "nsIPrintStatusFeedback.h"
 #include "nsIObserver.h"
 #include "nsString.h"
 
 class nsPrintProgress : public nsIPrintProgress, public nsIPrintStatusFeedback
 {
 public: 
-	NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIPRINTPROGRESS
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSIPRINTSTATUSFEEDBACK
 
 	nsPrintProgress();
 	virtual ~nsPrintProgress();
 
 private:
--- a/embedding/components/printingui/src/os2/nsPrintProgress.cpp
+++ b/embedding/components/printingui/src/os2/nsPrintProgress.cpp
@@ -6,18 +6,18 @@
 #include "nsPrintProgress.h"
 
 #include "nsIBaseWindow.h"
 #include "nsISupportsArray.h"
 #include "nsXPCOM.h"
 #include "nsISupportsPrimitives.h"
 #include "nsIComponentManager.h"
 
-NS_IMPL_THREADSAFE_ADDREF(nsPrintProgress)
-NS_IMPL_THREADSAFE_RELEASE(nsPrintProgress)
+NS_IMPL_ADDREF(nsPrintProgress)
+NS_IMPL_RELEASE(nsPrintProgress)
 
 NS_INTERFACE_MAP_BEGIN(nsPrintProgress)
    NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIPrintStatusFeedback)
    NS_INTERFACE_MAP_ENTRY(nsIPrintProgress)
    NS_INTERFACE_MAP_ENTRY(nsIPrintStatusFeedback)
    NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
 NS_INTERFACE_MAP_END_THREADSAFE
 
--- a/embedding/components/printingui/src/os2/nsPrintProgress.h
+++ b/embedding/components/printingui/src/os2/nsPrintProgress.h
@@ -13,17 +13,17 @@
 #include "nsIDOMWindow.h"
 #include "nsIPrintStatusFeedback.h"
 #include "nsIObserver.h"
 #include "nsString.h"
 
 class nsPrintProgress : public nsIPrintProgress, public nsIPrintStatusFeedback
 {
 public: 
-	NS_DECL_ISUPPORTS
+	NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIPRINTPROGRESS
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSIPRINTSTATUSFEEDBACK
 
 	nsPrintProgress();
 	virtual ~nsPrintProgress();
 
 private:
--- a/embedding/components/printingui/src/unixshared/nsPrintProgress.cpp
+++ b/embedding/components/printingui/src/unixshared/nsPrintProgress.cpp
@@ -6,18 +6,18 @@
 #include "nsPrintProgress.h"
 
 #include "nsIBaseWindow.h"
 #include "nsISupportsArray.h"
 #include "nsXPCOM.h"
 #include "nsISupportsPrimitives.h"
 #include "nsIComponentManager.h"
 
-NS_IMPL_THREADSAFE_ADDREF(nsPrintProgress)
-NS_IMPL_THREADSAFE_RELEASE(nsPrintProgress)
+NS_IMPL_ADDREF(nsPrintProgress)
+NS_IMPL_RELEASE(nsPrintProgress)
 
 NS_INTERFACE_MAP_BEGIN(nsPrintProgress)
    NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIPrintStatusFeedback)
    NS_INTERFACE_MAP_ENTRY(nsIPrintProgress)
    NS_INTERFACE_MAP_ENTRY(nsIPrintStatusFeedback)
    NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
 NS_INTERFACE_MAP_END_THREADSAFE
 
--- a/embedding/components/printingui/src/unixshared/nsPrintProgress.h
+++ b/embedding/components/printingui/src/unixshared/nsPrintProgress.h
@@ -14,17 +14,17 @@
 #include "nsIDOMWindow.h"
 #include "nsIPrintStatusFeedback.h"
 #include "nsIObserver.h"
 #include "nsString.h"
 
 class nsPrintProgress : public nsIPrintProgress, public nsIPrintStatusFeedback
 {
 public: 
-	NS_DECL_ISUPPORTS
+	NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIPRINTPROGRESS
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSIPRINTSTATUSFEEDBACK
 
 	nsPrintProgress(nsIPrintSettings* aPrintSettings);
 	virtual ~nsPrintProgress();
 
 private:
--- a/embedding/components/printingui/src/win/nsPrintProgress.cpp
+++ b/embedding/components/printingui/src/win/nsPrintProgress.cpp
@@ -9,33 +9,33 @@
 #include "nsISupportsArray.h"
 #include "nsXPCOM.h"
 #include "nsISupportsPrimitives.h"
 #include "nsIComponentManager.h"
 #include "nsIServiceManager.h"
 #include "nsAtomicRefcnt.h"
 
 #if 0
-NS_IMPL_THREADSAFE_ADDREF(nsPrintProgress)
-NS_IMPL_THREADSAFE_RELEASE(nsPrintProgress)
+NS_IMPL_ADDREF(nsPrintProgress)
+NS_IMPL_RELEASE(nsPrintProgress)
 #else
 NS_IMETHODIMP_(nsrefcnt) nsPrintProgress::AddRef(void)
 {
   NS_PRECONDITION(int32_t(mRefCnt) >= 0, "illegal refcnt");
   nsrefcnt count;
-  count = NS_AtomicIncrementRefcnt(mRefCnt);
+  count = ++mRefCnt;
   //NS_LOG_ADDREF(this, count, "nsPrintProgress", sizeof(*this));
   return count;
 }
 
 NS_IMETHODIMP_(nsrefcnt) nsPrintProgress::Release(void)
 {
   nsrefcnt count;
   NS_PRECONDITION(0 != mRefCnt, "dup release");
-  count = NS_AtomicDecrementRefcnt(mRefCnt);
+  count = --mRefCnt;
   //NS_LOG_RELEASE(this, count, "nsPrintProgress");
   if (0 == count) {
     mRefCnt = 1; /* stabilize */
     /* enable this to find non-threadsafe destructors: */
     /* NS_ASSERT_OWNINGTHREAD(nsPrintProgress); */
     delete this;
     return 0;
   }
--- a/embedding/components/printingui/src/win/nsPrintProgress.h
+++ b/embedding/components/printingui/src/win/nsPrintProgress.h
@@ -14,17 +14,17 @@
 #include "nsIPrintStatusFeedback.h"
 #include "nsString.h"
 #include "nsIWindowWatcher.h"
 #include "nsIObserver.h"
 
 class nsPrintProgress : public nsIPrintProgress, public nsIPrintStatusFeedback
 {
 public: 
-	NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIPRINTPROGRESS
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSIPRINTSTATUSFEEDBACK
 
 	nsPrintProgress();
 	virtual ~nsPrintProgress();
 
 private: