Bug 884061 - Part 3v: Use NS_DECL_THREADSAFE_ISUPPORTS in toolkit/, r=Mossop
authorJoshua Cranmer <Pidgeot18@gmail.com>
Thu, 18 Jul 2013 21:24:15 -0500
changeset 147199 58c8a357338c6255a096ca68c6182b1e01485b68
parent 147198 bf72f0094528d9f4546030da46e9d86d2444d973
child 147200 050a1e634338360286488fa5d5c1773ec40ee4b1
push idunknown
push userunknown
push dateunknown
reviewersMossop
bugs884061
milestone25.0a1
Bug 884061 - Part 3v: Use NS_DECL_THREADSAFE_ISUPPORTS in toolkit/, r=Mossop
toolkit/components/alerts/nsAlertsService.cpp
toolkit/components/alerts/nsAlertsService.h
toolkit/components/downloads/SQLFunctions.cpp
toolkit/components/downloads/SQLFunctions.h
toolkit/components/places/Database.cpp
toolkit/components/places/Database.h
toolkit/components/places/Helpers.cpp
toolkit/components/places/Helpers.h
toolkit/components/places/History.cpp
toolkit/components/places/History.h
toolkit/components/places/SQLFunctions.cpp
toolkit/components/places/SQLFunctions.h
toolkit/components/places/nsNavHistory.cpp
toolkit/components/places/nsNavHistory.h
toolkit/components/startup/nsAppStartup.cpp
toolkit/components/startup/nsAppStartup.h
toolkit/components/telemetry/Telemetry.cpp
toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
toolkit/components/url-classifier/nsUrlClassifierDBService.h
toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp
toolkit/components/url-classifier/nsUrlClassifierProxies.cpp
toolkit/components/url-classifier/nsUrlClassifierProxies.h
toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp
toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.h
toolkit/identity/IdentityCryptoService.cpp
toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp
toolkit/system/osxproxy/nsOSXSystemProxySettings.mm
toolkit/system/unixproxy/nsLibProxySettings.cpp
toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp
toolkit/xre/nsUpdateDriver.cpp
toolkit/xre/nsUpdateDriver.h
--- a/toolkit/components/alerts/nsAlertsService.cpp
+++ b/toolkit/components/alerts/nsAlertsService.cpp
@@ -19,17 +19,17 @@
 #include "nsToolkitCompsCID.h"
 
 #endif // !MOZ_WIDGET_ANDROID
 
 using namespace mozilla;
 
 using mozilla::dom::ContentChild;
 
-NS_IMPL_THREADSAFE_ISUPPORTS2(nsAlertsService, nsIAlertsService, nsIAlertsProgressListener)
+NS_IMPL_ISUPPORTS2(nsAlertsService, nsIAlertsService, nsIAlertsProgressListener)
 
 nsAlertsService::nsAlertsService()
 {
 }
 
 nsAlertsService::~nsAlertsService()
 {}
 
--- a/toolkit/components/alerts/nsAlertsService.h
+++ b/toolkit/components/alerts/nsAlertsService.h
@@ -28,17 +28,17 @@ typedef HRESULT (__stdcall *SHQueryUserN
 #endif // defined(XP_WIN)
 
 class nsAlertsService : public nsIAlertsService,
                         public nsIAlertsProgressListener
 {
 public:
   NS_DECL_NSIALERTSPROGRESSLISTENER
   NS_DECL_NSIALERTSSERVICE
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
 
   nsAlertsService();
   virtual ~nsAlertsService();
 
 protected:
   bool ShouldShowAlert();
   nsXULAlerts mXULAlerts;
 };
--- a/toolkit/components/downloads/SQLFunctions.cpp
+++ b/toolkit/components/downloads/SQLFunctions.cpp
@@ -47,17 +47,17 @@ GenerateGUIDFunction::create(mozIStorage
   nsresult rv = aDBConn->CreateFunction(
     NS_LITERAL_CSTRING("generate_guid"), 0, function
   );
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(
+NS_IMPL_ISUPPORTS1(
     GenerateGUIDFunction,
     mozIStorageFunction
 )
 
 static
 nsresult
 Base64urlEncode(const uint8_t* aBytes,
                 uint32_t aNumBytes,
--- a/toolkit/components/downloads/SQLFunctions.h
+++ b/toolkit/components/downloads/SQLFunctions.h
@@ -20,17 +20,17 @@ namespace downloads {
  * a wrapper around GenerateGUID in SQLFunctions.cpp.
  *
  * @return a guid for the item.
  * @see toolkit/components/places/SQLFunctions.h - keep this in sync
  */
 class GenerateGUIDFunction MOZ_FINAL : public mozIStorageFunction
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_MOZISTORAGEFUNCTION
 
   /**
    * Registers the function with the specified database connection.
    *
    * @param aDBConn
    *        The database connection to register with.
    */
--- a/toolkit/components/places/Database.cpp
+++ b/toolkit/components/places/Database.cpp
@@ -210,17 +210,17 @@ SetJournalMode(nsCOMPtr<mozIStorageConne
 
   return JOURNAL_DELETE;
 }
 
 class BlockingConnectionCloseCallback MOZ_FINAL : public mozIStorageCompletionCallback {
   bool mDone;
 
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_MOZISTORAGECOMPLETIONCALLBACK
   BlockingConnectionCloseCallback();
   void Spin();
 };
 
 NS_IMETHODIMP
 BlockingConnectionCloseCallback::Complete(nsresult, nsISupports*)
 {
@@ -244,17 +244,17 @@ BlockingConnectionCloseCallback::Blockin
 
 void BlockingConnectionCloseCallback::Spin() {
   nsCOMPtr<nsIThread> thread = do_GetCurrentThread();
   while (!mDone) {
     NS_ProcessNextEvent(thread);
   }
 }
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(
+NS_IMPL_ISUPPORTS1(
   BlockingConnectionCloseCallback
 , mozIStorageCompletionCallback
 )
 
 nsresult
 CreateRoot(nsCOMPtr<mozIStorageConnection>& aDBConn,
            const nsCString& aRootName,
            const nsXPIDLString& titleString)
@@ -327,17 +327,17 @@ CreateRoot(nsCOMPtr<mozIStorageConnectio
 
 } // Anonymous namespace
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Database
 
 PLACES_FACTORY_SINGLETON_IMPLEMENTATION(Database, gDatabase)
 
-NS_IMPL_THREADSAFE_ISUPPORTS2(Database
+NS_IMPL_ISUPPORTS2(Database
 , nsIObserver
 , nsISupportsWeakReference
 )
 
 Database::Database()
   : mMainThreadStatements(mMainConn)
   , mMainThreadAsyncStatements(mMainConn)
   , mAsyncThreadStatements(mMainConn)
--- a/toolkit/components/places/Database.h
+++ b/toolkit/components/places/Database.h
@@ -61,17 +61,17 @@ enum JournalMode {
 
 class Database MOZ_FINAL : public nsIObserver
                          , public nsSupportsWeakReference
 {
   typedef mozilla::storage::StatementCache<mozIStorageStatement> StatementCache;
   typedef mozilla::storage::StatementCache<mozIStorageAsyncStatement> AsyncStatementCache;
 
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIOBSERVER
 
   Database();
 
   /**
    * Initializes the database connection and the schema.
    * In case of corruption the database is copied to a backup file and replaced.
    */
--- a/toolkit/components/places/Helpers.cpp
+++ b/toolkit/components/places/Helpers.cpp
@@ -373,17 +373,17 @@ PlacesEvent::Notify()
 {
   NS_ASSERTION(NS_IsMainThread(), "Must only be used on the main thread!");
   nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
   if (obs) {
     (void)obs->NotifyObservers(nullptr, mTopic, nullptr);
   }
 }
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(
+NS_IMPL_ISUPPORTS1(
   PlacesEvent
 , nsIRunnable
 )
 
 ////////////////////////////////////////////////////////////////////////////////
 //// AsyncStatementCallbackNotifier
 
 NS_IMETHODIMP
--- a/toolkit/components/places/Helpers.h
+++ b/toolkit/components/places/Helpers.h
@@ -212,17 +212,17 @@ bool GetHiddenState(bool aIsRedirect,
                     uint32_t aTransitionType);
 
 /**
  * Notifies a specified topic via the observer service.
  */
 class PlacesEvent : public nsRunnable
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
 
   PlacesEvent(const char* aTopic);
 protected:
   void Notify();
 
   const char* const mTopic;
 };
--- a/toolkit/components/places/History.cpp
+++ b/toolkit/components/places/History.cpp
@@ -2925,17 +2925,17 @@ History::Observe(nsISupports* aSubject, 
   }
 
   return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 //// nsISupports
 
-NS_IMPL_THREADSAFE_ISUPPORTS4(
+NS_IMPL_ISUPPORTS4(
   History
 , IHistory
 , nsIDownloadHistory
 , mozIAsyncHistory
 , nsIObserver
 )
 
 } // namespace places
--- a/toolkit/components/places/History.h
+++ b/toolkit/components/places/History.h
@@ -35,17 +35,17 @@ struct VisitData;
 #define RECENTLY_VISITED_URI_SIZE 8
 
 class History : public IHistory
               , public nsIDownloadHistory
               , public mozIAsyncHistory
               , public nsIObserver
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_IHISTORY
   NS_DECL_NSIDOWNLOADHISTORY
   NS_DECL_MOZIASYNCHISTORY
   NS_DECL_NSIOBSERVER
 
   History();
 
   /**
--- a/toolkit/components/places/SQLFunctions.cpp
+++ b/toolkit/components/places/SQLFunctions.cpp
@@ -313,17 +313,17 @@ namespace places {
       case mozIPlacesAutoComplete::MATCH_BEGINNING_CASE_SENSITIVE:
         return findBeginningCaseSensitive;
       case mozIPlacesAutoComplete::MATCH_BOUNDARY:
       default:
         return findOnBoundary;
     };
   }
 
-  NS_IMPL_THREADSAFE_ISUPPORTS1(
+  NS_IMPL_ISUPPORTS1(
     MatchAutoCompleteFunction,
     mozIStorageFunction
   )
 
   //////////////////////////////////////////////////////////////////////////////
   //// mozIStorageFunction
 
   NS_IMETHODIMP
@@ -429,17 +429,17 @@ namespace places {
     nsresult rv = aDBConn->CreateFunction(
       NS_LITERAL_CSTRING("calculate_frecency"), 1, function
     );
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
   }
 
-  NS_IMPL_THREADSAFE_ISUPPORTS1(
+  NS_IMPL_ISUPPORTS1(
     CalculateFrecencyFunction,
     mozIStorageFunction
   )
 
   //////////////////////////////////////////////////////////////////////////////
   //// mozIStorageFunction
 
   NS_IMETHODIMP
@@ -631,17 +631,17 @@ namespace places {
     nsresult rv = aDBConn->CreateFunction(
       NS_LITERAL_CSTRING("generate_guid"), 0, function
     );
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
   }
 
-  NS_IMPL_THREADSAFE_ISUPPORTS1(
+  NS_IMPL_ISUPPORTS1(
     GenerateGUIDFunction,
     mozIStorageFunction
   )
 
   //////////////////////////////////////////////////////////////////////////////
   //// mozIStorageFunction
 
   NS_IMETHODIMP
@@ -670,17 +670,17 @@ namespace places {
     nsresult rv = aDBConn->CreateFunction(
       NS_LITERAL_CSTRING("get_unreversed_host"), 1, function
     );
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
   }
 
-  NS_IMPL_THREADSAFE_ISUPPORTS1(
+  NS_IMPL_ISUPPORTS1(
     GetUnreversedHostFunction,
     mozIStorageFunction
   )
 
   //////////////////////////////////////////////////////////////////////////////
   //// mozIStorageFunction
 
   NS_IMETHODIMP
@@ -724,17 +724,17 @@ namespace places {
     nsresult rv = aDBConn->CreateFunction(
       NS_LITERAL_CSTRING("fixup_url"), 1, function
     );
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
   }
 
-  NS_IMPL_THREADSAFE_ISUPPORTS1(
+  NS_IMPL_ISUPPORTS1(
     FixupURLFunction,
     mozIStorageFunction
   )
 
   //////////////////////////////////////////////////////////////////////////////
   //// mozIStorageFunction
 
   NS_IMETHODIMP
--- a/toolkit/components/places/SQLFunctions.h
+++ b/toolkit/components/places/SQLFunctions.h
@@ -54,17 +54,17 @@ namespace places {
  * @param aMatchBehavior
  *        The match behavior to use for this search.
  * @param aSearchBehavior
  *        A bitfield dictating the search behavior.
  */
 class MatchAutoCompleteFunction MOZ_FINAL : public mozIStorageFunction
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_MOZISTORAGEFUNCTION
 
   /**
    * Registers the function with the specified database connection.
    *
    * @param aDBConn
    *        The database connection to register with.
    */
@@ -191,17 +191,17 @@ private:
  * @param [optional] fullVisitCount
  *        Count of all the visits (All types).  Default is 0.
  * @param [optional] isBookmarked
  *        Whether the page is bookmarked. Default is false.
  */
 class CalculateFrecencyFunction MOZ_FINAL : public mozIStorageFunction
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_MOZISTORAGEFUNCTION
 
   /**
    * Registers the function with the specified database connection.
    *
    * @param aDBConn
    *        The database connection to register with.
    */
@@ -212,17 +212,17 @@ public:
  * SQL function to generate a GUID for a place or bookmark item.  This is just
  * a wrapper around GenerateGUID in Helpers.h.
  *
  * @return a guid for the item.
  */
 class GenerateGUIDFunction MOZ_FINAL : public mozIStorageFunction
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_MOZISTORAGEFUNCTION
 
   /**
    * Registers the function with the specified database connection.
    *
    * @param aDBConn
    *        The database connection to register with.
    */
@@ -235,17 +235,17 @@ public:
  * @param rev_host
  *        The rev_host value of the page.
  *
  * @return the unreversed host of the page.
  */
 class GetUnreversedHostFunction MOZ_FINAL : public mozIStorageFunction
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_MOZISTORAGEFUNCTION
 
   /**
    * Registers the function with the specified database connection.
    *
    * @param aDBConn
    *        The database connection to register with.
    */
@@ -263,17 +263,17 @@ public:
  * @param url
  *        A URL.
  * @return
  *        The same URL, with redundant parts removed.
  */
 class FixupURLFunction MOZ_FINAL : public mozIStorageFunction
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_MOZISTORAGEFUNCTION
 
   /**
    * Registers the function with the specified database connection.
    *
    * @param aDBConn
    *        The database connection to register with.
    */
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -154,18 +154,18 @@ static const char* kObservedPrefs[] = {
 , PREF_FREC_PERM_REDIRECT_VISIT_BONUS
 , PREF_FREC_TEMP_REDIRECT_VISIT_BONUS
 , PREF_FREC_DEFAULT_VISIT_BONUS
 , PREF_FREC_UNVISITED_BOOKMARK_BONUS
 , PREF_FREC_UNVISITED_TYPED_BONUS
 , nullptr
 };
 
-NS_IMPL_THREADSAFE_ADDREF(nsNavHistory)
-NS_IMPL_THREADSAFE_RELEASE(nsNavHistory)
+NS_IMPL_ADDREF(nsNavHistory)
+NS_IMPL_RELEASE(nsNavHistory)
 
 NS_IMPL_CLASSINFO(nsNavHistory, NULL, nsIClassInfo::SINGLETON,
                   NS_NAVHISTORYSERVICE_CID)
 NS_INTERFACE_MAP_BEGIN(nsNavHistory)
   NS_INTERFACE_MAP_ENTRY(nsINavHistoryService)
   NS_INTERFACE_MAP_ENTRY(nsIBrowserHistory)
   NS_INTERFACE_MAP_ENTRY(nsIObserver)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
--- a/toolkit/components/places/nsNavHistory.h
+++ b/toolkit/components/places/nsNavHistory.h
@@ -71,17 +71,17 @@ class nsNavHistory MOZ_FINAL : public ns
                              , public nsPIPlacesHistoryListenersNotifier
                              , public mozIStorageVacuumParticipant
 {
   friend class PlacesSQLQueryBuilder;
 
 public:
   nsNavHistory();
 
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSINAVHISTORYSERVICE
   NS_DECL_NSIBROWSERHISTORY
   NS_DECL_NSIOBSERVER
   NS_DECL_NSPIPLACESDATABASE
   NS_DECL_NSPIPLACESHISTORYLISTENERSNOTIFIER
   NS_DECL_MOZISTORAGEVACUUMPARTICIPANT
 
   /**
--- a/toolkit/components/startup/nsAppStartup.cpp
+++ b/toolkit/components/startup/nsAppStartup.cpp
@@ -211,17 +211,17 @@ nsAppStartup::Init()
   return NS_OK;
 }
 
 
 //
 // nsAppStartup->nsISupports
 //
 
-NS_IMPL_THREADSAFE_ISUPPORTS5(nsAppStartup,
+NS_IMPL_ISUPPORTS5(nsAppStartup,
                               nsIAppStartup,
                               nsIWindowCreator,
                               nsIWindowCreator2,
                               nsIObserver,
                               nsISupportsWeakReference)
 
 
 //
--- a/toolkit/components/startup/nsAppStartup.h
+++ b/toolkit/components/startup/nsAppStartup.h
@@ -30,17 +30,17 @@ struct PLEvent;
 
 
 class nsAppStartup MOZ_FINAL : public nsIAppStartup,
                                public nsIWindowCreator2,
                                public nsIObserver,
                                public nsSupportsWeakReference
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIAPPSTARTUP
   NS_DECL_NSIWINDOWCREATOR
   NS_DECL_NSIWINDOWCREATOR2
   NS_DECL_NSIOBSERVER
 
   nsAppStartup();
   nsresult Init();
 
--- a/toolkit/components/telemetry/Telemetry.cpp
+++ b/toolkit/components/telemetry/Telemetry.cpp
@@ -229,17 +229,17 @@ HangReports::GetStacks() const {
 
 uint32_t
 HangReports::GetDuration(unsigned aIndex) const {
   return mDurations[aIndex];
 }
 
 class TelemetryImpl MOZ_FINAL : public nsITelemetry
 {
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSITELEMETRY
 
 public:
   TelemetryImpl();
   ~TelemetryImpl();
   
   static bool CanRecord();
   static already_AddRefed<nsITelemetry> CreateTelemetryInstance();
@@ -2056,17 +2056,17 @@ TelemetryImpl::RecordChromeHang(uint32_t
     return;
 
   MutexAutoLock hangReportMutex(sTelemetry->mHangReportsMutex);
 
   sTelemetry->mHangReports.AddHang(aStack, duration);
 }
 #endif
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(TelemetryImpl, nsITelemetry)
+NS_IMPL_ISUPPORTS1(TelemetryImpl, nsITelemetry)
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsITelemetry, TelemetryImpl::CreateTelemetryInstance)
 
 #define NS_TELEMETRY_CID \
   {0xaea477f2, 0xb3a2, 0x469c, {0xaa, 0x29, 0x0a, 0x82, 0xd1, 0x32, 0xb8, 0x29}}
 NS_DEFINE_NAMED_CID(NS_TELEMETRY_CID);
 
 const Module::CIDEntry kTelemetryCIDs[] = {
   { &kNS_TELEMETRY_CID, false, NULL, nsITelemetryConstructor },
--- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
@@ -106,17 +106,17 @@ SplitTables(const nsACString& str, nsTAr
 // -------------------------------------------------------------------------
 // Actual worker implemenatation
 class nsUrlClassifierDBServiceWorker MOZ_FINAL :
   public nsIUrlClassifierDBServiceWorker
 {
 public:
   nsUrlClassifierDBServiceWorker();
 
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURLCLASSIFIERDBSERVICE
   NS_DECL_NSIURLCLASSIFIERDBSERVICEWORKER
 
   nsresult Init(uint32_t aGethashNoise, nsCOMPtr<nsIFile> aCacheDir);
 
   // Queue a lookup for the worker to perform, called in the main thread.
   nsresult QueueLookup(const nsACString& lookupKey,
                        nsIUrlClassifierLookupCallback* callback);
@@ -191,17 +191,17 @@ private:
     nsCString mKey;
     nsCOMPtr<nsIUrlClassifierLookupCallback> mCallback;
   };
 
   // list of pending lookups
   nsTArray<PendingLookup> mPendingLookups;
 };
 
-NS_IMPL_THREADSAFE_ISUPPORTS2(nsUrlClassifierDBServiceWorker,
+NS_IMPL_ISUPPORTS2(nsUrlClassifierDBServiceWorker,
                               nsIUrlClassifierDBServiceWorker,
                               nsIUrlClassifierDBService)
 
 nsUrlClassifierDBServiceWorker::nsUrlClassifierDBServiceWorker()
   : mInStream(false)
   , mGethashNoise(0)
   , mPendingLookupLock("nsUrlClassifierDBServerWorker.mPendingLookupLock")
 {
@@ -783,17 +783,17 @@ nsUrlClassifierDBServiceWorker::OpenDb()
 // This class takes the results of a lookup found on the worker thread
 // and handles any necessary partial hash expansions before calling
 // the client callback.
 
 class nsUrlClassifierLookupCallback MOZ_FINAL : public nsIUrlClassifierLookupCallback
                                               , public nsIUrlClassifierHashCompleterCallback
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURLCLASSIFIERLOOKUPCALLBACK
   NS_DECL_NSIURLCLASSIFIERHASHCOMPLETERCALLBACK
 
   nsUrlClassifierLookupCallback(nsUrlClassifierDBService *dbservice,
                                 nsIUrlClassifierCallback *c)
     : mDBService(dbservice)
     , mResults(nullptr)
     , mPendingCompletions(0)
@@ -810,17 +810,17 @@ private:
 
   // Completed results to send back to the worker for caching.
   nsAutoPtr<CacheResultArray> mCacheResults;
 
   uint32_t mPendingCompletions;
   nsCOMPtr<nsIUrlClassifierCallback> mCallback;
 };
 
-NS_IMPL_THREADSAFE_ISUPPORTS2(nsUrlClassifierLookupCallback,
+NS_IMPL_ISUPPORTS2(nsUrlClassifierLookupCallback,
                               nsIUrlClassifierLookupCallback,
                               nsIUrlClassifierHashCompleterCallback)
 
 nsUrlClassifierLookupCallback::~nsUrlClassifierLookupCallback()
 {
   nsCOMPtr<nsIThread> thread;
   (void)NS_GetMainThread(getter_AddRefs(thread));
 
@@ -1000,34 +1000,34 @@ nsUrlClassifierLookupCallback::HandleRes
 
 // -------------------------------------------------------------------------
 // Helper class for nsIURIClassifier implementation, translates table names
 // to nsIURIClassifier enums.
 
 class nsUrlClassifierClassifyCallback MOZ_FINAL : public nsIUrlClassifierCallback
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURLCLASSIFIERCALLBACK
 
   nsUrlClassifierClassifyCallback(nsIURIClassifierCallback *c,
                                   bool checkMalware,
                                   bool checkPhishing)
     : mCallback(c)
     , mCheckMalware(checkMalware)
     , mCheckPhishing(checkPhishing)
     {}
 
 private:
   nsCOMPtr<nsIURIClassifierCallback> mCallback;
   bool mCheckMalware;
   bool mCheckPhishing;
 };
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsUrlClassifierClassifyCallback,
+NS_IMPL_ISUPPORTS1(nsUrlClassifierClassifyCallback,
                               nsIUrlClassifierCallback)
 
 NS_IMETHODIMP
 nsUrlClassifierClassifyCallback::HandleEvent(const nsACString& tables)
 {
   // XXX: we should probably have the wardens tell the service which table
   // names match with which classification.  For now the table names give
   // enough information.
@@ -1054,17 +1054,17 @@ nsUrlClassifierClassifyCallback::HandleE
 
   return NS_OK;
 }
 
 
 // -------------------------------------------------------------------------
 // Proxy class implementation
 
-NS_IMPL_THREADSAFE_ISUPPORTS3(nsUrlClassifierDBService,
+NS_IMPL_ISUPPORTS3(nsUrlClassifierDBService,
                               nsIUrlClassifierDBService,
                               nsIURIClassifier,
                               nsIObserver)
 
 /* static */ nsUrlClassifierDBService*
 nsUrlClassifierDBService::GetInstance(nsresult *result)
 {
   *result = NS_OK;
--- a/toolkit/components/url-classifier/nsUrlClassifierDBService.h
+++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.h
@@ -46,17 +46,17 @@ public:
   nsUrlClassifierDBService();
 
   nsresult Init();
 
   static nsUrlClassifierDBService* GetInstance(nsresult *result);
 
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_URLCLASSIFIERDBSERVICE_CID)
 
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURLCLASSIFIERDBSERVICE
   NS_DECL_NSIURICLASSIFIER
   NS_DECL_NSIOBSERVER
 
   bool GetCompleter(const nsACString& tableName,
                       nsIUrlClassifierHashCompleter** completer);
   nsresult CacheCompletions(mozilla::safebrowsing::CacheResultArray *results);
   nsresult CacheMisses(mozilla::safebrowsing::PrefixArray *results);
--- a/toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp
@@ -35,25 +35,25 @@ static const PRLogModuleInfo *gUrlClassi
 #endif
 
 class nsPrefixSetReporter : public nsIMemoryReporter
 {
 public:
   nsPrefixSetReporter(nsUrlClassifierPrefixSet* aParent, const nsACString& aName);
   virtual ~nsPrefixSetReporter() {}
 
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIMEMORYREPORTER
 
 private:
   nsCString mPath;
   nsUrlClassifierPrefixSet* mParent;
 };
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsPrefixSetReporter, nsIMemoryReporter)
+NS_IMPL_ISUPPORTS1(nsPrefixSetReporter, nsIMemoryReporter)
 
 NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(StoragePrefixSetMallocSizeOf)
 
 nsPrefixSetReporter::nsPrefixSetReporter(nsUrlClassifierPrefixSet* aParent,
                                          const nsACString& aName)
 : mParent(aParent)
 {
   mPath.Assign(NS_LITERAL_CSTRING("explicit/storage/prefixset"));
--- a/toolkit/components/url-classifier/nsUrlClassifierProxies.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierProxies.cpp
@@ -13,17 +13,17 @@ DispatchToWorkerThread(nsIRunnable* r)
 {
   nsIThread* t = nsUrlClassifierDBService::BackgroundThread();
   if (!t)
     return NS_ERROR_FAILURE;
 
   return t->Dispatch(r, NS_DISPATCH_NORMAL);
 }
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(UrlClassifierDBServiceWorkerProxy,
+NS_IMPL_ISUPPORTS1(UrlClassifierDBServiceWorkerProxy,
                               nsIUrlClassifierDBServiceWorker)
 
 NS_IMETHODIMP
 UrlClassifierDBServiceWorkerProxy::Lookup(nsIPrincipal* aPrincipal,
                                           nsIUrlClassifierCallback* aCB)
 {
   nsCOMPtr<nsIRunnable> r = new LookupRunnable(mTarget, aPrincipal, aCB);
   return DispatchToWorkerThread(r);
@@ -176,17 +176,17 @@ UrlClassifierDBServiceWorkerProxy::Cache
 NS_IMETHODIMP
 UrlClassifierDBServiceWorkerProxy::CacheMissesRunnable::Run()
 {
   mTarget->CacheMisses(mEntries);
   return NS_OK;
 }
 
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(UrlClassifierLookupCallbackProxy,
+NS_IMPL_ISUPPORTS1(UrlClassifierLookupCallbackProxy,
                               nsIUrlClassifierLookupCallback)
 
 NS_IMETHODIMP
 UrlClassifierLookupCallbackProxy::LookupComplete
   (LookupResultArray * aResults)
 {
   nsCOMPtr<nsIRunnable> r = new LookupCompleteRunnable(mTarget, aResults);
   return NS_DispatchToMainThread(r);
@@ -194,34 +194,34 @@ UrlClassifierLookupCallbackProxy::Lookup
 
 NS_IMETHODIMP
 UrlClassifierLookupCallbackProxy::LookupCompleteRunnable::Run()
 {
   mTarget->LookupComplete(mResults);
   return NS_OK;
 }
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(UrlClassifierCallbackProxy,
+NS_IMPL_ISUPPORTS1(UrlClassifierCallbackProxy,
                               nsIUrlClassifierCallback)
 
 NS_IMETHODIMP
 UrlClassifierCallbackProxy::HandleEvent(const nsACString& aValue)
 {
   nsCOMPtr<nsIRunnable> r = new HandleEventRunnable(mTarget, aValue);
   return NS_DispatchToMainThread(r);
 }
 
 NS_IMETHODIMP
 UrlClassifierCallbackProxy::HandleEventRunnable::Run()
 {
   mTarget->HandleEvent(mValue);
   return NS_OK;
 }
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(UrlClassifierUpdateObserverProxy,
+NS_IMPL_ISUPPORTS1(UrlClassifierUpdateObserverProxy,
                               nsIUrlClassifierUpdateObserver)
 
 NS_IMETHODIMP
 UrlClassifierUpdateObserverProxy::UpdateUrlRequested
   (const nsACString& aURL,
    const nsACString& aTable,
    const nsACString& aServerMAC)
 {
--- a/toolkit/components/url-classifier/nsUrlClassifierProxies.h
+++ b/toolkit/components/url-classifier/nsUrlClassifierProxies.h
@@ -20,17 +20,17 @@
 class UrlClassifierDBServiceWorkerProxy MOZ_FINAL :
   public nsIUrlClassifierDBServiceWorker
 {
 public:
   UrlClassifierDBServiceWorkerProxy(nsIUrlClassifierDBServiceWorker* aTarget)
     : mTarget(aTarget)
   { }
 
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURLCLASSIFIERDBSERVICE
   NS_DECL_NSIURLCLASSIFIERDBSERVICEWORKER
 
   class LookupRunnable : public nsRunnable
   {
   public:
     LookupRunnable(nsIUrlClassifierDBServiceWorker* aTarget,
                    nsIPrincipal* aPrincipal,
@@ -160,17 +160,17 @@ private:
 class UrlClassifierLookupCallbackProxy MOZ_FINAL :
   public nsIUrlClassifierLookupCallback
 {
 public:
   UrlClassifierLookupCallbackProxy(nsIUrlClassifierLookupCallback* aTarget)
     : mTarget(new nsMainThreadPtrHolder<nsIUrlClassifierLookupCallback>(aTarget))
   { }
 
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURLCLASSIFIERLOOKUPCALLBACK
 
   class LookupCompleteRunnable : public nsRunnable
   {
   public:
     LookupCompleteRunnable(const nsMainThreadPtrHandle<nsIUrlClassifierLookupCallback>& aTarget,
                            mozilla::safebrowsing::LookupResultArray *aResults)
       : mTarget(aTarget)
@@ -190,17 +190,17 @@ private:
 
 class UrlClassifierCallbackProxy MOZ_FINAL : public nsIUrlClassifierCallback
 {
 public:
   UrlClassifierCallbackProxy(nsIUrlClassifierCallback* aTarget)
     : mTarget(new nsMainThreadPtrHolder<nsIUrlClassifierCallback>(aTarget))
   { }
 
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURLCLASSIFIERCALLBACK
 
   class HandleEventRunnable : public nsRunnable
   {
   public:
     HandleEventRunnable(const nsMainThreadPtrHandle<nsIUrlClassifierCallback>& aTarget,
                         const nsACString& aValue)
       : mTarget(aTarget)
@@ -221,17 +221,17 @@ private:
 class UrlClassifierUpdateObserverProxy MOZ_FINAL :
   public nsIUrlClassifierUpdateObserver
 {
 public:
   UrlClassifierUpdateObserverProxy(nsIUrlClassifierUpdateObserver* aTarget)
     : mTarget(new nsMainThreadPtrHolder<nsIUrlClassifierUpdateObserver>(aTarget))
   { }
 
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURLCLASSIFIERUPDATEOBSERVER
 
   class UpdateUrlRequestedRunnable : public nsRunnable
   {
   public:
     UpdateUrlRequestedRunnable(const nsMainThreadPtrHandle<nsIUrlClassifierUpdateObserver>& aTarget,
                                const nsACString& aURL,
                                const nsACString& aTable,
--- a/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp
@@ -37,17 +37,17 @@ nsUrlClassifierStreamUpdater::nsUrlClass
 {
 #if defined(PR_LOGGING)
   if (!gUrlClassifierStreamUpdaterLog)
     gUrlClassifierStreamUpdaterLog = PR_NewLogModule("UrlClassifierStreamUpdater");
 #endif
 
 }
 
-NS_IMPL_THREADSAFE_ISUPPORTS7(nsUrlClassifierStreamUpdater,
+NS_IMPL_ISUPPORTS7(nsUrlClassifierStreamUpdater,
                               nsIUrlClassifierStreamUpdater,
                               nsIUrlClassifierUpdateObserver,
                               nsIRequestObserver,
                               nsIStreamListener,
                               nsIObserver,
                               nsIInterfaceRequestor,
                               nsITimerCallback)
 
--- a/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.h
+++ b/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.h
@@ -25,17 +25,17 @@ class nsUrlClassifierStreamUpdater MOZ_F
                                                public nsIStreamListener,
                                                public nsIObserver,
                                                public nsIInterfaceRequestor,
                                                public nsITimerCallback
 {
 public:
   nsUrlClassifierStreamUpdater();
 
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURLCLASSIFIERSTREAMUPDATER
   NS_DECL_NSIURLCLASSIFIERUPDATEOBSERVER
   NS_DECL_NSIINTERFACEREQUESTOR
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSIOBSERVER
   NS_DECL_NSITIMERCALLBACK
 
--- a/toolkit/identity/IdentityCryptoService.cpp
+++ b/toolkit/identity/IdentityCryptoService.cpp
@@ -88,17 +88,17 @@ Base64UrlDecodeImpl(const nsACString & b
 }
 
 #define DSA_KEY_TYPE_STRING (NS_LITERAL_CSTRING("DS160"))
 #define RSA_KEY_TYPE_STRING (NS_LITERAL_CSTRING("RS256"))
 
 class KeyPair : public nsIIdentityKeyPair, public nsNSSShutDownObject
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIDENTITYKEYPAIR
 
   KeyPair(SECKEYPrivateKey* aPrivateKey, SECKEYPublicKey* aPublicKey);
 
 private:
   ~KeyPair()
   {
     destructorSafeDestroyNSSReference();
@@ -124,17 +124,17 @@ private:
 
   SECKEYPrivateKey * mPrivateKey;
   SECKEYPublicKey * mPublicKey;
 
   KeyPair(const KeyPair &) MOZ_DELETE;
   void operator=(const KeyPair &) MOZ_DELETE;
 };
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(KeyPair, nsIIdentityKeyPair)
+NS_IMPL_ISUPPORTS1(KeyPair, nsIIdentityKeyPair)
 
 class KeyGenRunnable : public nsRunnable, public nsNSSShutDownObject
 {
 public:
   NS_DECL_NSIRUNNABLE
 
   KeyGenRunnable(KeyType keyType, nsIIdentityKeyGenCallback * aCallback);
 
@@ -207,17 +207,17 @@ private:
 private:
   SignRunnable(const SignRunnable &) MOZ_DELETE;
   void operator=(const SignRunnable &) MOZ_DELETE;
 };
 
 class IdentityCryptoService MOZ_FINAL : public nsIIdentityCryptoService
 {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIDENTITYCRYPTOSERVICE
 
   IdentityCryptoService() { }
   nsresult Init()
   {
     nsresult rv;
     nsCOMPtr<nsISupports> dummyUsedToEnsureNSSIsInitialized
       = do_GetService("@mozilla.org/psm;1", &rv);
@@ -226,17 +226,17 @@ public:
     return NS_OK;
   }
 
 private:
   IdentityCryptoService(const KeyPair &) MOZ_DELETE;
   void operator=(const IdentityCryptoService &) MOZ_DELETE;
 };
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(IdentityCryptoService, nsIIdentityCryptoService)
+NS_IMPL_ISUPPORTS1(IdentityCryptoService, nsIIdentityCryptoService)
 
 NS_IMETHODIMP
 IdentityCryptoService::GenerateKeyPair(
   const nsACString & keyTypeString, nsIIdentityKeyGenCallback * callback)
 {
   KeyType keyType;
   if (keyTypeString.Equals(RSA_KEY_TYPE_STRING)) {
     keyType = rsaKey;
--- a/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp
+++ b/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp
@@ -15,27 +15,27 @@
 #include "nsISupportsPrimitives.h"
 #include "nsIURI.h"
 
 #include "AndroidBridge.h"
 
 class nsAndroidSystemProxySettings : public nsISystemProxySettings
 {
 public:
-    NS_DECL_ISUPPORTS
+    NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSISYSTEMPROXYSETTINGS
 
     nsAndroidSystemProxySettings() {};
     nsresult Init();
 
 private:
     ~nsAndroidSystemProxySettings() {};
 };
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsAndroidSystemProxySettings, nsISystemProxySettings)
+NS_IMPL_ISUPPORTS1(nsAndroidSystemProxySettings, nsISystemProxySettings)
 
 NS_IMETHODIMP
 nsAndroidSystemProxySettings::GetMainThreadOnly(bool *aMainThreadOnly)
 {
   *aMainThreadOnly = true;
   return NS_OK;
 }
 
--- a/toolkit/system/osxproxy/nsOSXSystemProxySettings.mm
+++ b/toolkit/system/osxproxy/nsOSXSystemProxySettings.mm
@@ -14,17 +14,17 @@
 #include "nsNetUtil.h"
 #include "nsISupportsPrimitives.h"
 #include "nsIURI.h"
 #include "nsObjCExceptions.h"
 #include "mozilla/Attributes.h"
 
 class nsOSXSystemProxySettings MOZ_FINAL : public nsISystemProxySettings {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSISYSTEMPROXYSETTINGS
 
   nsOSXSystemProxySettings();
   nsresult Init();
 
   // called by OSX when the proxy settings have changed
   void ProxyHasChanged();
 
@@ -53,17 +53,17 @@ private:
     CFStringRef mEnabled;
     CFStringRef mHost;
     CFStringRef mPort;
     bool mIsSocksProxy;
   };
   static const SchemeMapping gSchemeMappingList[];
 };
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsOSXSystemProxySettings, nsISystemProxySettings)
+NS_IMPL_ISUPPORTS1(nsOSXSystemProxySettings, nsISystemProxySettings)
 
 NS_IMETHODIMP
 nsOSXSystemProxySettings::GetMainThreadOnly(bool *aMainThreadOnly)
 {
   *aMainThreadOnly = true;
   return NS_OK;
 }
 
--- a/toolkit/system/unixproxy/nsLibProxySettings.cpp
+++ b/toolkit/system/unixproxy/nsLibProxySettings.cpp
@@ -13,32 +13,32 @@
 #include "nspr.h"
 
 extern "C" {
 #include <proxy.h>
 }
 
 class nsUnixSystemProxySettings : public nsISystemProxySettings {
 public:
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSISYSTEMPROXYSETTINGS
 
   nsUnixSystemProxySettings() { mProxyFactory = nullptr; }
   nsresult Init();
 
 private:
   ~nsUnixSystemProxySettings() {
     if (mProxyFactory) 
       px_proxy_factory_free(mProxyFactory); 
   }
 
   pxProxyFactory *mProxyFactory;
 };
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
+NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
 
 NS_IMETHODIMP
 nsUnixSystemProxySettings::GetMainThreadOnly(bool *aMainThreadOnly)
 {
   *aMainThreadOnly = false;
   return NS_OK;
 }
 
--- a/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp
+++ b/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp
@@ -15,30 +15,30 @@
 #include "nsPrintfCString.h"
 #include "nsNetUtil.h"
 #include "nsISupportsPrimitives.h"
 #include "nsIURI.h"
 
 class nsWindowsSystemProxySettings MOZ_FINAL : public nsISystemProxySettings
 {
 public:
-    NS_DECL_ISUPPORTS
+    NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSISYSTEMPROXYSETTINGS
 
     nsWindowsSystemProxySettings() {};
     nsresult Init();
 
 private:
     ~nsWindowsSystemProxySettings() {};
 
     bool MatchOverride(const nsACString& aHost);
     bool PatternMatch(const nsACString& aHost, const nsACString& aOverride);
 };
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsWindowsSystemProxySettings, nsISystemProxySettings)
+NS_IMPL_ISUPPORTS1(nsWindowsSystemProxySettings, nsISystemProxySettings)
 
 NS_IMETHODIMP
 nsWindowsSystemProxySettings::GetMainThreadOnly(bool *aMainThreadOnly)
 {
   *aMainThreadOnly = false;
   return NS_OK;
 }
 
--- a/toolkit/xre/nsUpdateDriver.cpp
+++ b/toolkit/xre/nsUpdateDriver.cpp
@@ -1014,17 +1014,17 @@ ProcessUpdates(nsIFile *greDir, nsIFile 
     break;
   }
 
   return NS_OK;
 }
 
 
 
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsUpdateProcessor, nsIUpdateProcessor)
+NS_IMPL_ISUPPORTS1(nsUpdateProcessor, nsIUpdateProcessor)
 
 nsUpdateProcessor::nsUpdateProcessor()
   : mUpdaterPID(0)
 {
 }
 
 NS_IMETHODIMP
 nsUpdateProcessor::ProcessUpdate(nsIUpdate* aUpdate)
--- a/toolkit/xre/nsUpdateDriver.h
+++ b/toolkit/xre/nsUpdateDriver.h
@@ -62,17 +62,17 @@ NS_HIDDEN_(nsresult) ProcessUpdates(nsIF
 // updater application in the background for applying an update.
 // XXX ehsan this is living in this file in order to make use of the existing
 // stuff here, we might want to move it elsewhere in the future.
 class nsUpdateProcessor MOZ_FINAL : public nsIUpdateProcessor
 {
 public:
   nsUpdateProcessor();
 
-  NS_DECL_ISUPPORTS
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIUPDATEPROCESSOR
 
 private:
   struct BackgroundUpdateInfo {
     BackgroundUpdateInfo()
       : mArgc(0),
         mArgv(nullptr),
         mIsOSUpdate(false)