Bug 884061 - Part 3l: Use NS_DECL_THREADSAFE_ISUPPORTS in intl/, r=smontagu
authorJoshua Cranmer <Pidgeot18@gmail.com>
Thu, 18 Jul 2013 21:23:32 -0500
changeset 152779 c00e38f175be47ca1441e2ea5e46ad4114e4f66a
parent 152778 352cb42a9c7a061724807a7bf4fc9312666a3786
child 152780 ed39337cc38f9573bfc6a82e1680e221fe2c0a60
push id382
push userakeybl@mozilla.com
push dateMon, 21 Oct 2013 21:47:13 +0000
treeherdermozilla-release@5f1868ee45cb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmontagu
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 3l: Use NS_DECL_THREADSAFE_ISUPPORTS in intl/, r=smontagu
intl/locale/src/mac/nsDateTimeFormatMac.cpp
intl/locale/src/mac/nsDateTimeFormatMac.h
intl/locale/src/nsLocale.cpp
intl/locale/src/nsLocale.h
intl/locale/src/nsLocaleService.cpp
intl/locale/src/os2/nsDateTimeFormatOS2.cpp
intl/locale/src/os2/nsDateTimeFormatOS2.h
intl/locale/src/unix/nsAndroidCharset.cpp
intl/locale/src/unix/nsDateTimeFormatUnix.cpp
intl/locale/src/unix/nsDateTimeFormatUnix.h
intl/locale/src/unix/nsUNIXCharset.cpp
intl/locale/src/windows/nsDateTimeFormatWin.cpp
intl/locale/src/windows/nsDateTimeFormatWin.h
intl/strres/src/nsStringBundle.cpp
intl/strres/src/nsStringBundle.h
intl/strres/src/nsStringBundleService.h
intl/uconv/src/nsCharsetConverterManager.cpp
intl/uconv/src/nsCharsetConverterManager.h
intl/uconv/util/nsUCSupport.cpp
intl/uconv/util/nsUCSupport.h
intl/unicharutil/src/nsCaseConversionImp2.cpp
intl/unicharutil/src/nsCaseConversionImp2.h
intl/unicharutil/src/nsCategoryImp.cpp
intl/unicharutil/src/nsCategoryImp.h
--- a/intl/locale/src/mac/nsDateTimeFormatMac.cpp
+++ b/intl/locale/src/mac/nsDateTimeFormatMac.cpp
@@ -11,17 +11,17 @@
 #include "nsLocaleCID.h"
 #include "nsILocaleService.h"
 #include "nsCRT.h"
 #include "plstr.h"
 #include "nsUnicharUtils.h"
 #include "nsTArray.h"
 
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsDateTimeFormatMac, nsIDateTimeFormat)
+NS_IMPL_ISUPPORTS1(nsDateTimeFormatMac, nsIDateTimeFormat)
 
 nsresult nsDateTimeFormatMac::Initialize(nsILocale* locale)
 {
   nsAutoString localeStr;
   nsAutoString category(NS_LITERAL_STRING("NSILOCALE_TIME"));
   nsresult res;
 
   // use cached info if match with stored locale
--- a/intl/locale/src/mac/nsDateTimeFormatMac.h
+++ b/intl/locale/src/mac/nsDateTimeFormatMac.h
@@ -10,17 +10,17 @@
 
 #include "nsCOMPtr.h"
 #include "nsIDateTimeFormat.h"
 
 
 class nsDateTimeFormatMac : public nsIDateTimeFormat {
 
 public: 
-  NS_DECL_ISUPPORTS 
+  NS_DECL_THREADSAFE_ISUPPORTS 
 
   // performs a locale sensitive date formatting operation on the time_t parameter
   NS_IMETHOD FormatTime(nsILocale* locale, 
                         const nsDateFormatSelector  dateFormatSelector, 
                         const nsTimeFormatSelector timeFormatSelector, 
                         const time_t  timetTime, 
                         nsAString& stringOut); 
 
--- a/intl/locale/src/nsLocale.cpp
+++ b/intl/locale/src/nsLocale.cpp
@@ -13,17 +13,17 @@
 #include "nsVoidArray.h"
 #include "nsMemory.h"
 #include "nsCRT.h"
 
 #define LOCALE_HASH_SIZE  0xFF
 
 
 /* nsILocale */
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsLocale, nsILocale)
+NS_IMPL_ISUPPORTS1(nsLocale, nsILocale)
 
 nsLocale::nsLocale(void)
 :  fHashtable(nullptr), fCategoryCount(0)
 {
   fHashtable = PL_NewHashTable(LOCALE_HASH_SIZE,&nsLocale::Hash_HashFunction,
                                &nsLocale::Hash_CompareNSString,
                                &nsLocale::Hash_CompareNSString,
                                nullptr, nullptr);
--- a/intl/locale/src/nsLocale.h
+++ b/intl/locale/src/nsLocale.h
@@ -22,17 +22,17 @@
 
 #include "nsString.h"
 #include "nsTArray.h"
 #include "nsILocale.h"
 #include "plhash.h"
 
 class nsLocale : public nsILocale {
 	friend class nsLocaleService;
-	NS_DECL_ISUPPORTS
+	NS_DECL_THREADSAFE_ISUPPORTS
 
 public:
 	nsLocale(void);
 	virtual ~nsLocale(void);
 	
 	/* Declare methods from nsILocale */
 	NS_DECL_NSILOCALE
 
--- a/intl/locale/src/nsLocaleService.cpp
+++ b/intl/locale/src/nsLocaleService.cpp
@@ -72,17 +72,17 @@ static int posix_locale_category[LocaleL
 //
 class nsLocaleService: public nsILocaleService {
 
 public:
 	
 	//
 	// nsISupports
 	//
-	NS_DECL_ISUPPORTS
+	NS_DECL_THREADSAFE_ISUPPORTS
 
 	//
 	// nsILocaleService
 	//
     NS_DECL_NSILOCALESERVICE
 
 
 	nsLocaleService(void);
@@ -246,17 +246,17 @@ nsLocaleService::nsLocaleService(void)
     NS_ASSERTION(mApplicationLocale, "Failed to create locale objects");
 #endif // XP_MACOSX
 }
 
 nsLocaleService::~nsLocaleService(void)
 {
 }
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsLocaleService, nsILocaleService)
+NS_IMPL_ISUPPORTS1(nsLocaleService, nsILocaleService)
 
 NS_IMETHODIMP
 nsLocaleService::NewLocale(const nsAString &aLocale, nsILocale **_retval)
 {
     nsresult result;
 
     *_retval = nullptr;
 
--- a/intl/locale/src/os2/nsDateTimeFormatOS2.cpp
+++ b/intl/locale/src/os2/nsDateTimeFormatOS2.cpp
@@ -1,16 +1,16 @@
 /* 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/. */
 
 #include <unidef.h>
 #include "nsDateTimeFormatOS2.h"
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsDateTimeFormatOS2,nsIDateTimeFormat)
+NS_IMPL_ISUPPORTS1(nsDateTimeFormatOS2,nsIDateTimeFormat)
 
 #define NSDATETIME_FORMAT_BUFFER_LEN  80
 
 #ifndef LOCI_iTime
 #define LOCI_iTime   ((LocaleItem)73)
 #endif
 
 nsresult nsDateTimeFormatOS2::FormatTime(nsILocale* locale, 
--- a/intl/locale/src/os2/nsDateTimeFormatOS2.h
+++ b/intl/locale/src/os2/nsDateTimeFormatOS2.h
@@ -4,17 +4,17 @@
 #ifndef _nsdatetimeformatos2_h_
 #define _nsdatetimeformatos2_h_
 
 #include "nsIDateTimeFormat.h"
 
 class nsDateTimeFormatOS2 : public nsIDateTimeFormat {
 
  public:
-   NS_DECL_ISUPPORTS
+   NS_DECL_THREADSAFE_ISUPPORTS
    
   // performs a locale sensitive date formatting operation on the time_t parameter
   NS_IMETHOD FormatTime(nsILocale* locale, 
                         const nsDateFormatSelector  dateFormatSelector, 
                         const nsTimeFormatSelector timeFormatSelector, 
                         const time_t  timetTime, 
                         nsAString& stringOut);
 
--- a/intl/locale/src/unix/nsAndroidCharset.cpp
+++ b/intl/locale/src/unix/nsAndroidCharset.cpp
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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/. */
 
 #include "nsIPlatformCharset.h"
 #include "nsPlatformCharset.h"
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsPlatformCharset, nsIPlatformCharset)
+NS_IMPL_ISUPPORTS1(nsPlatformCharset, nsIPlatformCharset)
 
 nsPlatformCharset::nsPlatformCharset()
 {
 }
 
 nsPlatformCharset::~nsPlatformCharset()
 {
 }
--- a/intl/locale/src/unix/nsDateTimeFormatUnix.cpp
+++ b/intl/locale/src/unix/nsDateTimeFormatUnix.cpp
@@ -10,17 +10,17 @@
 #include "nsIComponentManager.h"
 #include "nsILocaleService.h"
 #include "nsIPlatformCharset.h"
 #include "nsPosixLocale.h"
 #include "nsCRT.h"
 #include "nsReadableUtils.h"
 #include "nsUnicharUtils.h"
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsDateTimeFormatUnix, nsIDateTimeFormat)
+NS_IMPL_ISUPPORTS1(nsDateTimeFormatUnix, nsIDateTimeFormat)
 
 // init this interface to a specified locale
 nsresult nsDateTimeFormatUnix::Initialize(nsILocale* locale)
 {
   nsAutoString localeStr;
   NS_NAMED_LITERAL_STRING(aCategory, "NSILOCALE_TIME##PLATFORM");
   nsresult res = NS_OK;
 
--- a/intl/locale/src/unix/nsDateTimeFormatUnix.h
+++ b/intl/locale/src/unix/nsDateTimeFormatUnix.h
@@ -12,17 +12,17 @@
 #include "nsCOMPtr.h"
 #include "nsIDateTimeFormat.h"
 
 #define kPlatformLocaleLength 64
 
 class nsDateTimeFormatUnix : public nsIDateTimeFormat {
 
 public: 
-  NS_DECL_ISUPPORTS 
+  NS_DECL_THREADSAFE_ISUPPORTS 
 
   // performs a locale sensitive date formatting operation on the time_t parameter
   NS_IMETHOD FormatTime(nsILocale* locale, 
                         const nsDateFormatSelector  dateFormatSelector, 
                         const nsTimeFormatSelector timeFormatSelector, 
                         const time_t  timetTime, 
                         nsAString& stringOut); 
 
--- a/intl/locale/src/unix/nsUNIXCharset.cpp
+++ b/intl/locale/src/unix/nsUNIXCharset.cpp
@@ -31,17 +31,17 @@
 #include "nsUnicharUtils.h"
 
 using namespace mozilla;
 
 static const char* kUnixCharsets[][3] = {
 #include "unixcharset.properties.h"
 };
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsPlatformCharset, nsIPlatformCharset)
+NS_IMPL_ISUPPORTS1(nsPlatformCharset, nsIPlatformCharset)
 
 nsPlatformCharset::nsPlatformCharset()
 {
 }
 
 static nsresult
 ConvertLocaleToCharsetUsingDeprecatedConfig(const nsACString& locale,
                                             nsACString& oResult)
--- a/intl/locale/src/windows/nsDateTimeFormatWin.cpp
+++ b/intl/locale/src/windows/nsDateTimeFormatWin.cpp
@@ -11,17 +11,17 @@
 #include "nsWin32Locale.h"
 #include "nsUnicharUtils.h"
 #include "nsCRT.h"
 #include "nsCOMPtr.h"
 
 
 #define NSDATETIMEFORMAT_BUFFER_LEN  80
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsDateTimeFormatWin, nsIDateTimeFormat)
+NS_IMPL_ISUPPORTS1(nsDateTimeFormatWin, nsIDateTimeFormat)
 
 
 // init this interface to a specified locale
 nsresult nsDateTimeFormatWin::Initialize(nsILocale* locale)
 {
   nsAutoString localeStr;
   nsresult res = NS_OK;
 
--- a/intl/locale/src/windows/nsDateTimeFormatWin.h
+++ b/intl/locale/src/windows/nsDateTimeFormatWin.h
@@ -12,17 +12,17 @@
 #include <windows.h>
 
 
 // Locale sensitive date and time format interface
 // 
 class nsDateTimeFormatWin : public nsIDateTimeFormat {
 
 public: 
-  NS_DECL_ISUPPORTS 
+  NS_DECL_THREADSAFE_ISUPPORTS 
 
   // performs a locale sensitive date formatting operation on the time_t parameter
   NS_IMETHOD FormatTime(nsILocale* locale, 
                         const nsDateFormatSelector  dateFormatSelector, 
                         const nsTimeFormatSelector timeFormatSelector, 
                         const time_t  timetTime, 
                         nsAString& stringOut); 
 
--- a/intl/strres/src/nsStringBundle.cpp
+++ b/intl/strres/src/nsStringBundle.cpp
@@ -193,18 +193,17 @@ nsStringBundle::FormatStringFromName(con
   nsAutoString formatStr;
   rv = GetStringFromName(nsDependentString(aName), formatStr);
   if (NS_FAILED(rv)) return rv;
 
   return FormatString(formatStr.get(), aParams, aLength, aResult);
 }
                                      
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsStringBundle,
-                              nsIStringBundle)
+NS_IMPL_ISUPPORTS1(nsStringBundle, nsIStringBundle)
 
 /* void GetStringFromID (in long aID, out wstring aResult); */
 NS_IMETHODIMP
 nsStringBundle::GetStringFromID(int32_t aID, PRUnichar **aResult)
 {
   nsresult rv;
   rv = LoadProperties();
   if (NS_FAILED(rv)) return rv;
@@ -517,20 +516,20 @@ nsStringBundleService::nsStringBundleSer
                    sizeof(bundleCacheEntry_t)*MAX_CACHED_BUNDLES,
                    sizeof(bundleCacheEntry_t));
 
   mErrorService = do_GetService(kErrorServiceCID);
   NS_ASSERTION(mErrorService, "Couldn't get error service");
 
 }
 
-NS_IMPL_THREADSAFE_ISUPPORTS3(nsStringBundleService,
-                              nsIStringBundleService,
-                              nsIObserver,
-                              nsISupportsWeakReference)
+NS_IMPL_ISUPPORTS3(nsStringBundleService,
+                   nsIStringBundleService,
+                   nsIObserver,
+                   nsISupportsWeakReference)
 
 nsStringBundleService::~nsStringBundleService()
 {
   flushBundleCache();
   PL_FinishArenaPool(&mCacheEntryPool);
 }
 
 nsresult
--- a/intl/strres/src/nsStringBundle.h
+++ b/intl/strres/src/nsStringBundle.h
@@ -17,17 +17,17 @@
 class nsStringBundle : public nsIStringBundle
 {
 public:
     // init version
     nsStringBundle(const char* aURLSpec, nsIStringBundleOverride*);
     nsresult LoadProperties();
     virtual ~nsStringBundle();
   
-    NS_DECL_ISUPPORTS
+    NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSISTRINGBUNDLE
 
     nsCOMPtr<nsIPersistentProperties> mProps;
 
 protected:
     //
     // functional decomposition of the funitions repeatively called 
     //
--- a/intl/strres/src/nsStringBundleService.h
+++ b/intl/strres/src/nsStringBundleService.h
@@ -26,17 +26,17 @@ class nsStringBundleService : public nsI
                               public nsSupportsWeakReference
 {
 public:
   nsStringBundleService();
   virtual ~nsStringBundleService();
 
   nsresult Init();
 
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSISTRINGBUNDLESERVICE
   NS_DECL_NSIOBSERVER
     
 private:
   nsresult getStringBundle(const char *aUrl, nsIStringBundle** aResult);
   nsresult FormatWithBundle(nsIStringBundle* bundle, nsresult aStatus, 
                             uint32_t argCount, PRUnichar** argArray,
                             PRUnichar* *result);
--- a/intl/uconv/src/nsCharsetConverterManager.cpp
+++ b/intl/uconv/src/nsCharsetConverterManager.cpp
@@ -26,18 +26,17 @@
 // just for CONTRACTIDs
 #include "nsCharsetConverterManager.h"
 
 static nsIStringBundle * sDataBundle;
 static nsIStringBundle * sTitleBundle;
 
 // Class nsCharsetConverterManager [implementation]
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsCharsetConverterManager,
-                              nsICharsetConverterManager)
+NS_IMPL_ISUPPORTS1(nsCharsetConverterManager, nsICharsetConverterManager)
 
 nsCharsetConverterManager::nsCharsetConverterManager() 
 {
 }
 
 nsCharsetConverterManager::~nsCharsetConverterManager() 
 {
 }
--- a/intl/uconv/src/nsCharsetConverterManager.h
+++ b/intl/uconv/src/nsCharsetConverterManager.h
@@ -12,17 +12,17 @@
 #include "mozilla/Mutex.h"
 
 class nsCharsetAlias;
 
 class nsCharsetConverterManager : public nsICharsetConverterManager
 {
   friend class nsCharsetAlias;
 
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSICHARSETCONVERTERMANAGER
 
 public:
   nsCharsetConverterManager();
   virtual ~nsCharsetConverterManager();
 
   static void Shutdown();
 
--- a/intl/uconv/util/nsUCSupport.cpp
+++ b/intl/uconv/util/nsUCSupport.cpp
@@ -25,21 +25,21 @@ nsBasicDecoderSupport::nsBasicDecoderSup
 nsBasicDecoderSupport::~nsBasicDecoderSupport()
 {
 }
 
 //----------------------------------------------------------------------
 // Interface nsISupports [implementation]
 
 #ifdef DEBUG
-NS_IMPL_THREADSAFE_ISUPPORTS2(nsBasicDecoderSupport,
-                              nsIUnicodeDecoder,
-                              nsIBasicDecoder)
+NS_IMPL_ISUPPORTS2(nsBasicDecoderSupport,
+                   nsIUnicodeDecoder,
+                   nsIBasicDecoder)
 #else
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsBasicDecoderSupport, nsIUnicodeDecoder)
+NS_IMPL_ISUPPORTS1(nsBasicDecoderSupport, nsIUnicodeDecoder)
 #endif
 
 //----------------------------------------------------------------------
 // Interface nsIUnicodeDecoder [implementation]
 
 void
 nsBasicDecoderSupport::SetInputErrorBehavior(int32_t aBehavior)
 {
--- a/intl/uconv/util/nsUCSupport.h
+++ b/intl/uconv/util/nsUCSupport.h
@@ -64,17 +64,17 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIBasicEn
  * @created         19/Apr/1999
  * @author  Catalin Rotaru [CATA]
  */
 class nsBasicDecoderSupport : public nsIUnicodeDecoder
 #ifdef DEBUG
                               ,public nsIBasicDecoder
 #endif
 {
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
 
 public:
 
   /**
    * Class constructor.
    */
   nsBasicDecoderSupport();
 
--- a/intl/unicharutil/src/nsCaseConversionImp2.cpp
+++ b/intl/unicharutil/src/nsCaseConversionImp2.cpp
@@ -11,17 +11,17 @@ NS_IMETHODIMP_(nsrefcnt) nsCaseConversio
   return (nsrefcnt)1;
 }
 
 NS_IMETHODIMP_(nsrefcnt) nsCaseConversionImp2::Release(void)
 {
   return (nsrefcnt)1;
 }
 
-NS_IMPL_THREADSAFE_QUERY_INTERFACE1(nsCaseConversionImp2, nsICaseConversion)
+NS_IMPL_QUERY_INTERFACE1(nsCaseConversionImp2, nsICaseConversion)
 
 NS_IMETHODIMP nsCaseConversionImp2::ToUpper(PRUnichar aChar, PRUnichar* aReturn)
 {
   *aReturn = ToUpperCase(aChar);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsCaseConversionImp2::ToLower(PRUnichar aChar, PRUnichar* aReturn)
--- a/intl/unicharutil/src/nsCaseConversionImp2.h
+++ b/intl/unicharutil/src/nsCaseConversionImp2.h
@@ -7,17 +7,17 @@
 #define nsCaseConversionImp2_h__
 
 #include "nscore.h"
 #include "nsISupports.h"
 
 #include "nsICaseConversion.h"
 
 class nsCaseConversionImp2 : public nsICaseConversion { 
-  NS_DECL_ISUPPORTS 
+  NS_DECL_THREADSAFE_ISUPPORTS 
 
 public:
   virtual ~nsCaseConversionImp2() { }
 
   static nsCaseConversionImp2* GetInstance();
 
   NS_IMETHOD ToUpper(PRUnichar aChar, PRUnichar* aReturn);
 
--- a/intl/unicharutil/src/nsCategoryImp.cpp
+++ b/intl/unicharutil/src/nsCategoryImp.cpp
@@ -5,17 +5,17 @@
 
 #include "nscore.h"
 #include "nsISupports.h"
 #include "nsCategoryImp.h"
 #include "nsUnicodeProperties.h"
 
 static nsCategoryImp gCategoryImp;
 
-NS_IMPL_THREADSAFE_QUERY_INTERFACE1(nsCategoryImp, nsIUGenCategory)
+NS_IMPL_QUERY_INTERFACE1(nsCategoryImp, nsIUGenCategory)
 
 NS_IMETHODIMP_(nsrefcnt) nsCategoryImp::AddRef(void)
 {
   return nsrefcnt(1);
 }
 
 NS_IMETHODIMP_(nsrefcnt) nsCategoryImp::Release(void)
 {
--- a/intl/unicharutil/src/nsCategoryImp.h
+++ b/intl/unicharutil/src/nsCategoryImp.h
@@ -3,17 +3,17 @@
  * 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 nsCategoryImp_h__
 #define nsCategoryImp_h__
 
 #include "nsIUGenCategory.h"
 
 class nsCategoryImp : public nsIUGenCategory {
-   NS_DECL_ISUPPORTS
+   NS_DECL_THREADSAFE_ISUPPORTS
    
 public:
    static nsCategoryImp* GetInstance();
     
    /**
     * Give a Unichar, return a nsUGenCategory
     */
    virtual nsUGenCategory Get(uint32_t aChar);