Bug 884061 - Part 3y: Use NS_DECL_THREADSAFE_ISUPPORTS in xpcom/, r=bsmedberg

--HG--
extra : rebase_source : d54f6973e3ff859207115013e8361781769ffc76
This commit is contained in:
Joshua Cranmer 2013-07-18 21:31:26 -05:00
Родитель c0dfb98101
Коммит 1a6dffc73f
78 изменённых файлов: 188 добавлений и 198 удалений

Просмотреть файл

@ -116,7 +116,7 @@ class MapsReporter MOZ_FINAL : public nsIMemoryMultiReporter
public:
MapsReporter();
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_IMETHOD GetName(nsACString &aName)
{
@ -158,7 +158,7 @@ private:
nsTHashtable<nsCStringHashKey> mMozillaLibraries;
};
NS_IMPL_THREADSAFE_ISUPPORTS1(MapsReporter, nsIMemoryMultiReporter)
NS_IMPL_ISUPPORTS1(MapsReporter, nsIMemoryMultiReporter)
MapsReporter::MapsReporter()
: mSearchedForLibxul(false)

Просмотреть файл

@ -11,7 +11,7 @@
#include "nsReadableUtils.h"
#include "jsapi.h"
NS_IMPL_THREADSAFE_ISUPPORTS1(nsConsoleMessage, nsIConsoleMessage)
NS_IMPL_ISUPPORTS1(nsConsoleMessage, nsIConsoleMessage)
nsConsoleMessage::nsConsoleMessage()
: mTimeStamp(0),

Просмотреть файл

@ -16,7 +16,7 @@ public:
nsConsoleMessage();
nsConsoleMessage(const PRUnichar *message);
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSICONSOLEMESSAGE
private:

Просмотреть файл

@ -31,8 +31,8 @@
using namespace mozilla;
NS_IMPL_THREADSAFE_ADDREF(nsConsoleService)
NS_IMPL_THREADSAFE_RELEASE(nsConsoleService)
NS_IMPL_ADDREF(nsConsoleService)
NS_IMPL_RELEASE(nsConsoleService)
NS_IMPL_CLASSINFO(nsConsoleService, NULL, nsIClassInfo::THREADSAFE | nsIClassInfo::SINGLETON, NS_CONSOLESERVICE_CID)
NS_IMPL_QUERY_INTERFACE1_CI(nsConsoleService, nsIConsoleService)
NS_IMPL_CI_INTERFACE_GETTER1(nsConsoleService, nsIConsoleService)

Просмотреть файл

@ -25,7 +25,7 @@ public:
nsConsoleService();
nsresult Init();
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSICONSOLESERVICE
void SetIsDelivering() {

Просмотреть файл

@ -42,7 +42,7 @@ public:
class nsExceptionManager MOZ_FINAL : public nsIExceptionManager
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIEXCEPTIONMANAGER
nsExceptionManager(nsExceptionService *svc);
@ -67,7 +67,7 @@ int32_t nsExceptionManager::totalInstances = 0;
// one per thread.
// An exception if the destructor, which may be called on
// the thread shutting down xpcom
NS_IMPL_THREADSAFE_ISUPPORTS1(nsExceptionManager, nsIExceptionManager)
NS_IMPL_ISUPPORTS1(nsExceptionManager, nsIExceptionManager)
nsExceptionManager::nsExceptionManager(nsExceptionService *svc) :
mNextThread(nullptr),
@ -122,10 +122,10 @@ nsExceptionManager *nsExceptionService::firstThread = nullptr;
int32_t nsExceptionService::totalInstances = 0;
#endif
NS_IMPL_THREADSAFE_ISUPPORTS3(nsExceptionService,
nsIExceptionService,
nsIExceptionManager,
nsIObserver)
NS_IMPL_ISUPPORTS3(nsExceptionService,
nsIExceptionService,
nsIExceptionManager,
nsIObserver)
nsExceptionService::nsExceptionService()
: mProviders(4, true) /* small, thread-safe hashtable */

Просмотреть файл

@ -21,7 +21,7 @@ class nsExceptionManager;
class nsExceptionService MOZ_FINAL : public nsIExceptionService, public nsIObserver
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIEXCEPTIONSERVICE
NS_DECL_NSIEXCEPTIONMANAGER
NS_DECL_NSIOBSERVER

Просмотреть файл

@ -310,7 +310,7 @@ interface nsIMemoryReporterManager : nsISupports
#define NS_MEMORY_REPORTER_IMPLEMENT_HELPER(_classname, _path, _kind, _units, _amountFunction, _desc, _ts) \
class MemoryReporter_##_classname MOZ_FINAL : public nsIMemoryReporter { \
public: \
NS_DECL_ISUPPORTS \
NS_DECL##_ts##ISUPPORTS \
NS_IMETHOD GetProcess(nsACString &process) { process.Truncate(); return NS_OK; } \
NS_IMETHOD GetPath(nsACString &memoryPath) { memoryPath.AssignLiteral(_path); return NS_OK; } \
NS_IMETHOD GetKind(int *kind) { *kind = _kind; return NS_OK; } \
@ -318,14 +318,14 @@ interface nsIMemoryReporterManager : nsISupports
NS_IMETHOD GetAmount(int64_t *amount) { *amount = _amountFunction(); return NS_OK; } \
NS_IMETHOD GetDescription(nsACString &desc) { desc.AssignLiteral(_desc); return NS_OK; } \
}; \
NS_IMPL##_ts##ISUPPORTS1(MemoryReporter_##_classname, nsIMemoryReporter)
NS_IMPL_ISUPPORTS1(MemoryReporter_##_classname, nsIMemoryReporter)
// The only difference between this and NS_MEMORY_REPORTER_IMPLEMENT_HELPER
// is that the function used to implement GetAmount is fallible.
#define NS_FALLIBLE_MEMORY_REPORTER_IMPLEMENT_HELPER(_classname, _path, _kind, _units, _amountFunction, _desc, _ts) \
class MemoryReporter_##_classname MOZ_FINAL : public nsIMemoryReporter { \
public: \
NS_DECL_ISUPPORTS \
NS_DECL##_ts##ISUPPORTS \
NS_IMETHOD GetProcess(nsACString &process) { process.Truncate(); return NS_OK; } \
NS_IMETHOD GetPath(nsACString &memoryPath) { memoryPath.AssignLiteral(_path); return NS_OK; } \
NS_IMETHOD GetKind(int32_t *kind) { *kind = _kind; return NS_OK; } \
@ -333,7 +333,7 @@ interface nsIMemoryReporterManager : nsISupports
NS_IMETHOD GetAmount(int64_t *amount) { return _amountFunction(amount); } \
NS_IMETHOD GetDescription(nsACString &desc) { desc.AssignLiteral(_desc); return NS_OK; }\
}; \
NS_IMPL##_ts##ISUPPORTS1(MemoryReporter_##_classname, nsIMemoryReporter)
NS_IMPL_ISUPPORTS1(MemoryReporter_##_classname, nsIMemoryReporter)
#define NS_MEMORY_REPORTER_IMPLEMENT(_c, _p, _k, _u, _a, _d) \
NS_MEMORY_REPORTER_IMPLEMENT_HELPER(_c, _p, _k, _u, _a, _d, _)
@ -448,7 +448,7 @@ public:
virtual ~MemoryReporterBase() {}
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_IMETHOD GetProcess(nsACString& aProcess)
{

Просмотреть файл

@ -11,7 +11,8 @@
class nsInterfaceRequestorAgg MOZ_FINAL : public nsIInterfaceRequestor
{
public:
NS_DECL_ISUPPORTS
// XXX This needs to support threadsafe refcounting until we fix bug 243591.
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIINTERFACEREQUESTOR
nsInterfaceRequestorAgg(nsIInterfaceRequestor *aFirst,
@ -32,8 +33,7 @@ private:
nsCOMPtr<nsIEventTarget> mConsumerTarget;
};
// XXX This needs to support threadsafe refcounting until we fix bug 243591.
NS_IMPL_THREADSAFE_ISUPPORTS1(nsInterfaceRequestorAgg, nsIInterfaceRequestor)
NS_IMPL_ISUPPORTS1(nsInterfaceRequestorAgg, nsIInterfaceRequestor)
NS_IMETHODIMP
nsInterfaceRequestorAgg::GetInterface(const nsIID &aIID, void **aResult)

Просмотреть файл

@ -191,7 +191,7 @@ public:
virtual void OnFileCanReadWithoutBlocking(int aFd) = 0;
virtual void OnFileCanWriteWithoutBlocking(int aFd) {};
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
/**
* Initialize this object. This should be called right after the object is
@ -258,7 +258,7 @@ public:
}
};
NS_IMPL_THREADSAFE_ISUPPORTS1(FdWatcher, nsIObserver);
NS_IMPL_ISUPPORTS1(FdWatcher, nsIObserver);
class SignalPipeWatcher : public FdWatcher
{

Просмотреть файл

@ -682,7 +682,7 @@ NS_IMPL_ISUPPORTS1(DMDMultiReporter, nsIMemoryMultiReporter)
** nsMemoryReporterManager implementation
**/
NS_IMPL_THREADSAFE_ISUPPORTS1(nsMemoryReporterManager, nsIMemoryReporterManager)
NS_IMPL_ISUPPORTS1(nsMemoryReporterManager, nsIMemoryReporterManager)
NS_IMETHODIMP
nsMemoryReporterManager::Init()
@ -1199,7 +1199,7 @@ nsMemoryReporterManager::MinimizeMemoryUsage(nsIRunnable* aCallback,
// Most memory reporters don't need thread safety, but some do. Make them all
// thread-safe just to be safe. Memory reporters are created and destroyed
// infrequently enough that the performance cost should be negligible.
NS_IMPL_THREADSAFE_ISUPPORTS1(MemoryReporterBase, nsIMemoryReporter)
NS_IMPL_ISUPPORTS1(MemoryReporterBase, nsIMemoryReporter)
nsresult
NS_RegisterMemoryReporter (nsIMemoryReporter *reporter)

Просмотреть файл

@ -16,7 +16,7 @@ using mozilla::Mutex;
class nsMemoryReporterManager : public nsIMemoryReporterManager
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIMEMORYREPORTERMANAGER
nsMemoryReporterManager();

Просмотреть файл

@ -19,7 +19,7 @@
using namespace mozilla;
NS_IMPL_THREADSAFE_ISUPPORTS1(nsUUIDGenerator, nsIUUIDGenerator)
NS_IMPL_ISUPPORTS1(nsUUIDGenerator, nsIUUIDGenerator)
nsUUIDGenerator::nsUUIDGenerator()
: mLock("nsUUIDGenerator.mLock")

Просмотреть файл

@ -15,7 +15,7 @@ class nsUUIDGenerator MOZ_FINAL : public nsIUUIDGenerator {
public:
nsUUIDGenerator();
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIUUIDGENERATOR

Просмотреть файл

@ -110,7 +110,7 @@ public:
{
}
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIMODULE
private:

Просмотреть файл

@ -834,12 +834,12 @@ nsComponentManagerImpl::~nsComponentManagerImpl()
PR_LOG(nsComponentManagerLog, PR_LOG_DEBUG, ("nsComponentManager: Destroyed."));
}
NS_IMPL_THREADSAFE_ISUPPORTS5(nsComponentManagerImpl,
nsIComponentManager,
nsIServiceManager,
nsIComponentRegistrar,
nsISupportsWeakReference,
nsIInterfaceRequestor)
NS_IMPL_ISUPPORTS5(nsComponentManagerImpl,
nsIComponentManager,
nsIServiceManager,
nsIComponentRegistrar,
nsISupportsWeakReference,
nsIInterfaceRequestor)
nsresult

Просмотреть файл

@ -126,7 +126,7 @@ class nsComponentManagerImpl MOZ_FINAL
, public nsIInterfaceRequestor
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIINTERFACEREQUESTOR
NS_DECL_NSICOMPONENTMANAGER
NS_DECL_NSICOMPONENTREGISTRAR

Просмотреть файл

@ -5,7 +5,7 @@
#include "nsAtomService.h"
NS_IMPL_THREADSAFE_ISUPPORTS1(nsAtomService, nsIAtomService)
NS_IMPL_ISUPPORTS1(nsAtomService, nsIAtomService)
nsAtomService::nsAtomService()
{

Просмотреть файл

@ -13,7 +13,7 @@ class nsAtomService MOZ_FINAL : public nsIAtomService
{
public:
nsAtomService();
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIATOMSERVICE

Просмотреть файл

@ -36,8 +36,8 @@ NS_NewHashPropertyBag(nsIWritablePropertyBag* *_retval)
* nsHashPropertyBag impl
*/
NS_IMPL_THREADSAFE_ADDREF(nsHashPropertyBag)
NS_IMPL_THREADSAFE_RELEASE(nsHashPropertyBag)
NS_IMPL_ADDREF(nsHashPropertyBag)
NS_IMPL_RELEASE(nsHashPropertyBag)
NS_INTERFACE_MAP_BEGIN(nsHashPropertyBag)
NS_INTERFACE_MAP_ENTRY(nsIWritablePropertyBag)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIPropertyBag, nsIWritablePropertyBag)

Просмотреть файл

@ -23,7 +23,7 @@ public:
nsresult Init();
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIPROPERTYBAG

Просмотреть файл

@ -48,7 +48,7 @@ GetObserverServiceLog()
// nsObserverService Implementation
NS_IMPL_THREADSAFE_ISUPPORTS2(nsObserverService, nsIObserverService, nsObserverService)
NS_IMPL_ISUPPORTS2(nsObserverService, nsIObserverService, nsObserverService)
nsObserverService::nsObserverService() :
mShuttingDown(false)

Просмотреть файл

@ -21,7 +21,7 @@ public:
nsObserverService();
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIOBSERVERSERVICE
void Shutdown();

Просмотреть файл

@ -494,7 +494,7 @@ nsPersistentProperties::Create(nsISupports *aOuter, REFNSIID aIID, void **aResul
return rv;
}
NS_IMPL_THREADSAFE_ISUPPORTS2(nsPersistentProperties, nsIPersistentProperties, nsIProperties)
NS_IMPL_ISUPPORTS2(nsPersistentProperties, nsIPersistentProperties, nsIProperties)
NS_IMETHODIMP
nsPersistentProperties::Load(nsIInputStream *aIn)

Просмотреть файл

@ -22,7 +22,7 @@ public:
nsPersistentProperties();
nsresult Init();
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIPROPERTIES
NS_DECL_NSIPERSISTENTPROPERTIES

Просмотреть файл

@ -174,7 +174,7 @@ nsSupportsArray::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
return it->QueryInterface(aIID, aResult);
}
NS_IMPL_THREADSAFE_ISUPPORTS3(nsSupportsArray, nsISupportsArray, nsICollection, nsISerializable)
NS_IMPL_ISUPPORTS3(nsSupportsArray, nsISupportsArray, nsICollection, nsISerializable)
NS_IMETHODIMP
nsSupportsArray::Read(nsIObjectInputStream *aStream)

Просмотреть файл

@ -21,7 +21,7 @@ public:
static nsresult
Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSISERIALIZABLE

Просмотреть файл

@ -146,8 +146,8 @@ NS_IMETHODIMP nsSupportsStringImpl::SetData(const nsAString& aData)
/***************************************************************************/
NS_IMPL_THREADSAFE_ISUPPORTS2(nsSupportsPRBoolImpl, nsISupportsPRBool,
nsISupportsPrimitive)
NS_IMPL_ISUPPORTS2(nsSupportsPRBoolImpl, nsISupportsPRBool,
nsISupportsPrimitive)
nsSupportsPRBoolImpl::nsSupportsPRBoolImpl()
: mData(false)
@ -683,8 +683,8 @@ NS_IMETHODIMP nsSupportsDoubleImpl::ToString(char **_retval)
/***************************************************************************/
NS_IMPL_THREADSAFE_ISUPPORTS2(nsSupportsVoidImpl, nsISupportsVoid,
nsISupportsPrimitive)
NS_IMPL_ISUPPORTS2(nsSupportsVoidImpl, nsISupportsVoid,
nsISupportsPrimitive)
nsSupportsVoidImpl::nsSupportsVoidImpl()
: mData(nullptr)
@ -725,9 +725,9 @@ NS_IMETHODIMP nsSupportsVoidImpl::ToString(char **_retval)
/***************************************************************************/
NS_IMPL_THREADSAFE_ISUPPORTS2(nsSupportsInterfacePointerImpl,
nsISupportsInterfacePointer,
nsISupportsPrimitive)
NS_IMPL_ISUPPORTS2(nsSupportsInterfacePointerImpl,
nsISupportsInterfacePointer,
nsISupportsPrimitive)
nsSupportsInterfacePointerImpl::nsSupportsInterfacePointerImpl()
: mIID(nullptr)

Просмотреть файл

@ -67,7 +67,7 @@ private:
class nsSupportsPRBoolImpl MOZ_FINAL : public nsISupportsPRBool
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSISUPPORTSPRIMITIVE
NS_DECL_NSISUPPORTSPRBOOL
@ -271,7 +271,7 @@ private:
class nsSupportsVoidImpl MOZ_FINAL : public nsISupportsVoid
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSISUPPORTSPRIMITIVE
NS_DECL_NSISUPPORTSVOID
@ -288,7 +288,7 @@ private:
class nsSupportsInterfacePointerImpl MOZ_FINAL : public nsISupportsInterfacePointer
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSISUPPORTSPRIMITIVE
NS_DECL_NSISUPPORTSINTERFACEPOINTER

Просмотреть файл

@ -7,7 +7,7 @@
namespace mozilla {
NS_IMPL_THREADSAFE_ISUPPORTS1(GenericFactory, nsIFactory)
NS_IMPL_ISUPPORTS1(GenericFactory, nsIFactory)
NS_IMETHODIMP
GenericFactory::CreateInstance(nsISupports* aOuter, REFNSIID aIID,

Просмотреть файл

@ -22,7 +22,7 @@ class GenericFactory MOZ_FINAL : public nsIFactory
public:
typedef Module::ConstructorProcPtr ConstructorProcPtr;
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIFACTORY
GenericFactory(ConstructorProcPtr ctor)

Просмотреть файл

@ -15,7 +15,7 @@
namespace mozilla {
NS_IMPL_THREADSAFE_ISUPPORTS1(GenericModule, nsIModule)
NS_IMPL_ISUPPORTS1(GenericModule, nsIModule)
NS_IMETHODIMP
GenericModule::GetClassObject(nsIComponentManager* aCompMgr,

Просмотреть файл

@ -142,13 +142,9 @@ public:
bool operator==(const nsMainThreadPtrHolder<T>& aOther) const { return mRawPtr == aOther.mRawPtr; }
NS_IMETHOD_(nsrefcnt) Release();
NS_IMETHOD_(nsrefcnt) AddRef();
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(nsMainThreadPtrHolder<T>)
private:
// This class is threadsafe and reference-counted.
nsAutoRefCnt mRefCnt;
// Our wrapped pointer.
T* mRawPtr;
@ -161,11 +157,6 @@ private:
nsMainThreadPtrHolder(const nsMainThreadPtrHolder& other);
};
template<class T>
NS_IMPL_THREADSAFE_ADDREF(nsMainThreadPtrHolder<T>)
template<class T>
NS_IMPL_THREADSAFE_RELEASE(nsMainThreadPtrHolder<T>)
template<class T>
class nsMainThreadPtrHandle
{

Просмотреть файл

@ -28,7 +28,7 @@
#ifndef XPCOM_GLUE_AVOID_NSPR
NS_IMPL_THREADSAFE_ISUPPORTS1(nsRunnable, nsIRunnable)
NS_IMPL_ISUPPORTS1(nsRunnable, nsIRunnable)
NS_IMETHODIMP
nsRunnable::Run()
@ -37,7 +37,7 @@ nsRunnable::Run()
return NS_OK;
}
NS_IMPL_THREADSAFE_ISUPPORTS2(nsCancelableRunnable, nsICancelableRunnable,
NS_IMPL_ISUPPORTS2(nsCancelableRunnable, nsICancelableRunnable,
nsIRunnable)
NS_IMETHODIMP
@ -247,14 +247,14 @@ class nsNameThreadRunnable MOZ_FINAL : public nsIRunnable
public:
nsNameThreadRunnable(const nsACString &name) : mName(name) { }
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIRUNNABLE
protected:
const nsCString mName;
};
NS_IMPL_THREADSAFE_ISUPPORTS1(nsNameThreadRunnable, nsIRunnable)
NS_IMPL_ISUPPORTS1(nsNameThreadRunnable, nsIRunnable)
NS_IMETHODIMP
nsNameThreadRunnable::Run()

Просмотреть файл

@ -236,7 +236,7 @@ extern NS_COM_GLUE nsIThread *NS_GetCurrentThread();
class NS_COM_GLUE nsRunnable : public nsIRunnable
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIRUNNABLE
nsRunnable() {
@ -251,7 +251,7 @@ protected:
class NS_COM_GLUE nsCancelableRunnable : public nsICancelableRunnable
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIRUNNABLE
NS_DECL_NSICANCELABLERUNNABLE

Просмотреть файл

@ -78,7 +78,7 @@ nsAppFileLocationProvider::nsAppFileLocationProvider()
// nsAppFileLocationProvider::nsISupports
//*****************************************************************************
NS_IMPL_THREADSAFE_ISUPPORTS2(nsAppFileLocationProvider, nsIDirectoryServiceProvider, nsIDirectoryServiceProvider2)
NS_IMPL_ISUPPORTS2(nsAppFileLocationProvider, nsIDirectoryServiceProvider, nsIDirectoryServiceProvider2)
//*****************************************************************************
// nsAppFileLocationProvider::nsIDirectoryServiceProvider

Просмотреть файл

@ -18,7 +18,7 @@ class nsAppFileLocationProvider MOZ_FINAL : public nsIDirectoryServiceProvider2
public:
nsAppFileLocationProvider();
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIDIRECTORYSERVICEPROVIDER
NS_DECL_NSIDIRECTORYSERVICEPROVIDER2

Просмотреть файл

@ -288,7 +288,7 @@ nsDirectoryService::~nsDirectoryService()
{
}
NS_IMPL_THREADSAFE_ISUPPORTS4(nsDirectoryService, nsIProperties, nsIDirectoryService, nsIDirectoryServiceProvider, nsIDirectoryServiceProvider2)
NS_IMPL_ISUPPORTS4(nsDirectoryService, nsIProperties, nsIDirectoryService, nsIDirectoryServiceProvider, nsIDirectoryServiceProvider2)
NS_IMETHODIMP

Просмотреть файл

@ -24,7 +24,7 @@ class nsDirectoryService MOZ_FINAL : public nsIDirectoryService,
public:
// nsISupports interface
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIPROPERTIES

Просмотреть файл

@ -8,7 +8,7 @@
#include "nsIOutputStream.h"
#include "nsStreamUtils.h"
NS_IMPL_THREADSAFE_ISUPPORTS1(nsIOUtil, nsIIOUtil)
NS_IMPL_ISUPPORTS1(nsIOUtil, nsIIOUtil)
NS_IMETHODIMP
nsIOUtil::InputStreamIsBuffered(nsIInputStream* aStream, bool* _retval)

Просмотреть файл

@ -17,7 +17,7 @@
class nsIOUtil MOZ_FINAL : public nsIIOUtil
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIIOUTIL
};

Просмотреть файл

@ -35,7 +35,7 @@ GetTeeLog()
class nsInputStreamTee MOZ_FINAL : public nsIInputStreamTee
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIINPUTSTREAM
NS_DECL_NSIINPUTSTREAMTEE
@ -205,9 +205,9 @@ nsInputStreamTee::WriteSegmentFun(nsIInputStream *in, void *closure, const char
return tee->TeeSegment(fromSegment, *writeCount);
}
NS_IMPL_THREADSAFE_ISUPPORTS2(nsInputStreamTee,
nsIInputStreamTee,
nsIInputStream)
NS_IMPL_ISUPPORTS2(nsInputStreamTee,
nsIInputStreamTee,
nsIInputStream)
NS_IMETHODIMP
nsInputStreamTee::Close()
{

Просмотреть файл

@ -580,11 +580,11 @@ nsLocalFile::nsLocalFileConstructor(nsISupports* outer, const nsIID& aIID, void*
// nsLocalFile::nsISupports
//-----------------------------------------------------------------------------
NS_IMPL_THREADSAFE_ISUPPORTS4(nsLocalFile,
nsILocalFile,
nsIFile,
nsILocalFileOS2,
nsIHashable)
NS_IMPL_ISUPPORTS4(nsLocalFile,
nsILocalFile,
nsIFile,
nsILocalFileOS2,
nsIHashable)
//-----------------------------------------------------------------------------

Просмотреть файл

@ -44,7 +44,7 @@ public:
static nsresult nsLocalFileConstructor(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr);
// nsISupports interface
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
// nsIFile interface
NS_DECL_NSIFILE

Просмотреть файл

@ -239,16 +239,16 @@ nsLocalFile::nsLocalFile(const nsLocalFile& other)
}
#ifdef MOZ_WIDGET_COCOA
NS_IMPL_THREADSAFE_ISUPPORTS4(nsLocalFile,
nsILocalFileMac,
nsILocalFile,
nsIFile,
nsIHashable)
NS_IMPL_ISUPPORTS4(nsLocalFile,
nsILocalFileMac,
nsILocalFile,
nsIFile,
nsIHashable)
#else
NS_IMPL_THREADSAFE_ISUPPORTS3(nsLocalFile,
nsILocalFile,
nsIFile,
nsIHashable)
NS_IMPL_ISUPPORTS3(nsLocalFile,
nsILocalFile,
nsIFile,
nsIHashable)
#endif
nsresult

Просмотреть файл

@ -91,7 +91,7 @@ public:
static nsresult nsLocalFileConstructor(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr);
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIFILE
NS_DECL_NSILOCALFILE
#ifdef MOZ_WIDGET_COCOA

Просмотреть файл

@ -979,11 +979,11 @@ nsLocalFile::nsLocalFileConstructor(nsISupports* outer, const nsIID& aIID, void*
// nsLocalFile::nsISupports
//-----------------------------------------------------------------------------
NS_IMPL_THREADSAFE_ISUPPORTS4(nsLocalFile,
nsILocalFile,
nsIFile,
nsILocalFileWin,
nsIHashable)
NS_IMPL_ISUPPORTS4(nsLocalFile,
nsILocalFile,
nsIFile,
nsILocalFileWin,
nsIHashable)
//-----------------------------------------------------------------------------

Просмотреть файл

@ -34,7 +34,7 @@ public:
static nsresult nsLocalFileConstructor(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr);
// nsISupports interface
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
// nsIFile interface
NS_DECL_NSIFILE

Просмотреть файл

@ -33,7 +33,7 @@ class nsMultiplexInputStream MOZ_FINAL : public nsIMultiplexInputStream,
public:
nsMultiplexInputStream();
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIINPUTSTREAM
NS_DECL_NSIMULTIPLEXINPUTSTREAM
NS_DECL_NSISEEKABLESTREAM
@ -60,8 +60,8 @@ private:
nsresult mStatus;
};
NS_IMPL_THREADSAFE_ADDREF(nsMultiplexInputStream)
NS_IMPL_THREADSAFE_RELEASE(nsMultiplexInputStream)
NS_IMPL_ADDREF(nsMultiplexInputStream)
NS_IMPL_RELEASE(nsMultiplexInputStream)
NS_IMPL_CLASSINFO(nsMultiplexInputStream, NULL, nsIClassInfo::THREADSAFE,
NS_MULTIPLEXINPUTSTREAM_CID)

Просмотреть файл

@ -128,7 +128,7 @@ private:
nsPipe *mPipe;
// separate refcnt so that we know when to close the consumer
nsrefcnt mReaderRefCnt;
mozilla::ThreadSafeAutoRefCnt mReaderRefCnt;
int64_t mLogicalOffset;
bool mBlocking;
@ -182,7 +182,7 @@ private:
nsPipe *mPipe;
// separate refcnt so that we know when to close the producer
nsrefcnt mWriterRefCnt;
mozilla::ThreadSafeAutoRefCnt mWriterRefCnt;
int64_t mLogicalOffset;
bool mBlocking;
@ -201,7 +201,7 @@ public:
friend class nsPipeInputStream;
friend class nsPipeOutputStream;
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIPIPE
// nsPipe methods:
@ -311,7 +311,7 @@ nsPipe::~nsPipe()
{
}
NS_IMPL_THREADSAFE_ISUPPORTS1(nsPipe, nsIPipe)
NS_IMPL_ISUPPORTS1(nsPipe, nsIPipe)
NS_IMETHODIMP
nsPipe::Init(bool nonBlockingIn,
@ -680,14 +680,14 @@ nsPipeInputStream::OnInputException(nsresult reason, nsPipeEvents &events)
NS_IMETHODIMP_(nsrefcnt)
nsPipeInputStream::AddRef(void)
{
NS_AtomicIncrementRefcnt(mReaderRefCnt);
++mReaderRefCnt;
return mPipe->AddRef();
}
NS_IMETHODIMP_(nsrefcnt)
nsPipeInputStream::Release(void)
{
if (NS_AtomicDecrementRefcnt(mReaderRefCnt) == 0)
if (--mReaderRefCnt == 0)
Close();
return mPipe->Release();
}
@ -1035,14 +1035,14 @@ nsPipeOutputStream::OnOutputException(nsresult reason, nsPipeEvents &events)
NS_IMETHODIMP_(nsrefcnt)
nsPipeOutputStream::AddRef()
{
NS_AtomicIncrementRefcnt(mWriterRefCnt);
++mWriterRefCnt;
return mPipe->AddRef();
}
NS_IMETHODIMP_(nsrefcnt)
nsPipeOutputStream::Release()
{
if (NS_AtomicDecrementRefcnt(mWriterRefCnt) == 0)
if (--mWriterRefCnt == 0)
Close();
return mPipe->Release();
}

Просмотреть файл

@ -59,9 +59,9 @@ nsStorageStream::~nsStorageStream()
delete mSegmentedBuffer;
}
NS_IMPL_THREADSAFE_ISUPPORTS2(nsStorageStream,
nsIStorageStream,
nsIOutputStream)
NS_IMPL_ISUPPORTS2(nsStorageStream,
nsIStorageStream,
nsIOutputStream)
NS_IMETHODIMP
nsStorageStream::Init(uint32_t segmentSize, uint32_t maxSize,
@ -320,7 +320,7 @@ public:
NS_ADDREF(mStorageStream);
}
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIINPUTSTREAM
NS_DECL_NSISEEKABLESTREAM
@ -348,9 +348,9 @@ private:
uint32_t SegOffset(uint32_t aPosition) {return aPosition & (mSegmentSize - 1);}
};
NS_IMPL_THREADSAFE_ISUPPORTS2(nsStorageInputStream,
nsIInputStream,
nsISeekableStream)
NS_IMPL_ISUPPORTS2(nsStorageInputStream,
nsIInputStream,
nsISeekableStream)
NS_IMETHODIMP
nsStorageStream::NewInputStream(int32_t aStartingOffset, nsIInputStream* *aInputStream)

Просмотреть файл

@ -37,7 +37,7 @@ class nsStorageStream MOZ_FINAL : public nsIStorageStream,
public:
nsStorageStream();
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSISTORAGESTREAM
NS_DECL_NSIOUTPUTSTREAM

Просмотреть файл

@ -22,7 +22,7 @@ class nsInputStreamReadyEvent MOZ_FINAL : public nsIRunnable
, public nsIInputStreamCallback
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
nsInputStreamReadyEvent(nsIInputStreamCallback *callback,
nsIEventTarget *target)
@ -91,8 +91,8 @@ private:
nsCOMPtr<nsIEventTarget> mTarget;
};
NS_IMPL_THREADSAFE_ISUPPORTS2(nsInputStreamReadyEvent, nsIRunnable,
nsIInputStreamCallback)
NS_IMPL_ISUPPORTS2(nsInputStreamReadyEvent, nsIRunnable,
nsIInputStreamCallback)
//-----------------------------------------------------------------------------
@ -100,7 +100,7 @@ class nsOutputStreamReadyEvent MOZ_FINAL : public nsIRunnable
, public nsIOutputStreamCallback
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
nsOutputStreamReadyEvent(nsIOutputStreamCallback *callback,
nsIEventTarget *target)
@ -169,8 +169,8 @@ private:
nsCOMPtr<nsIEventTarget> mTarget;
};
NS_IMPL_THREADSAFE_ISUPPORTS2(nsOutputStreamReadyEvent, nsIRunnable,
nsIOutputStreamCallback)
NS_IMPL_ISUPPORTS2(nsOutputStreamReadyEvent, nsIRunnable,
nsIOutputStreamCallback)
//-----------------------------------------------------------------------------
@ -205,7 +205,7 @@ class nsAStreamCopier : public nsIInputStreamCallback
, public nsIRunnable
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
nsAStreamCopier()
: mLock("nsAStreamCopier.mLock")
@ -459,10 +459,10 @@ protected:
nsresult mCancelStatus;
};
NS_IMPL_THREADSAFE_ISUPPORTS3(nsAStreamCopier,
nsIInputStreamCallback,
nsIOutputStreamCallback,
nsIRunnable)
NS_IMPL_ISUPPORTS3(nsAStreamCopier,
nsIInputStreamCallback,
nsIOutputStreamCallback,
nsIRunnable)
class nsStreamCopierIB MOZ_FINAL : public nsAStreamCopier
{

Просмотреть файл

@ -35,7 +35,7 @@ class nsStringInputStream MOZ_FINAL : public nsIStringInputStream
, public nsIIPCSerializableInputStream
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIINPUTSTREAM
NS_DECL_NSISTRINGINPUTSTREAM
NS_DECL_NSISEEKABLESTREAM
@ -78,8 +78,8 @@ private:
// This class needs to support threadsafe refcounting since people often
// allocate a string stream, and then read it from a background thread.
NS_IMPL_THREADSAFE_ADDREF(nsStringInputStream)
NS_IMPL_THREADSAFE_RELEASE(nsStringInputStream)
NS_IMPL_ADDREF(nsStringInputStream)
NS_IMPL_RELEASE(nsStringInputStream)
NS_IMPL_CLASSINFO(nsStringInputStream, NULL, nsIClassInfo::THREADSAFE,
NS_STRINGINPUTSTREAM_CID)

Просмотреть файл

@ -26,7 +26,7 @@ namespace mozilla {
class XPTInterfaceInfoManager MOZ_FINAL
: public nsIInterfaceInfoManager
{
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIINTERFACEINFOMANAGER
public:

Просмотреть файл

@ -595,7 +595,7 @@ xptiInterfaceInfo::~xptiInterfaceInfo()
nsrefcnt
xptiInterfaceInfo::AddRef(void)
{
nsrefcnt cnt = NS_AtomicIncrementRefcnt(mRefCnt);
nsrefcnt cnt = ++mRefCnt;
NS_LOG_ADDREF(this, cnt, "xptiInterfaceInfo", sizeof(*this));
return cnt;
}
@ -604,7 +604,7 @@ nsrefcnt
xptiInterfaceInfo::Release(void)
{
xptiInterfaceEntry* entry = mEntry;
nsrefcnt cnt = NS_AtomicDecrementRefcnt(mRefCnt);
nsrefcnt cnt = --mRefCnt;
NS_LOG_RELEASE(this, cnt, "xptiInterfaceInfo");
if(!cnt)
{

Просмотреть файл

@ -19,8 +19,8 @@
using namespace mozilla;
NS_IMPL_THREADSAFE_ISUPPORTS1(XPTInterfaceInfoManager,
nsIInterfaceInfoManager)
NS_IMPL_ISUPPORTS1(XPTInterfaceInfoManager,
nsIInterfaceInfoManager)
static XPTInterfaceInfoManager* gInterfaceInfoManager = nullptr;
#ifdef DEBUG

Просмотреть файл

@ -291,7 +291,7 @@ private:
class xptiInterfaceInfo MOZ_FINAL : public nsIInterfaceInfo
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
// Use delegation to implement (most!) of nsIInterfaceInfo.
NS_IMETHOD GetName(char * *aName) { return !mEntry ? NS_ERROR_UNEXPECTED : mEntry->GetName(aName); }

Просмотреть файл

@ -106,7 +106,7 @@ WriteAll(nsIOutputStream *os, const char *buf, uint32_t bufLen, uint32_t *lenWri
class nsReceiver : public nsIRunnable {
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_IMETHOD Run() {
nsresult rv;
@ -146,7 +146,7 @@ protected:
uint32_t mCount;
};
NS_IMPL_THREADSAFE_ISUPPORTS1(nsReceiver, nsIRunnable)
NS_IMPL_ISUPPORTS1(nsReceiver, nsIRunnable)
nsresult
TestPipe(nsIInputStream* in, nsIOutputStream* out)
@ -197,7 +197,7 @@ TestPipe(nsIInputStream* in, nsIOutputStream* out)
class nsShortReader : public nsIRunnable {
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_IMETHOD Run() {
nsresult rv;
@ -261,7 +261,7 @@ protected:
Monitor* mMon;
};
NS_IMPL_THREADSAFE_ISUPPORTS1(nsShortReader, nsIRunnable)
NS_IMPL_ISUPPORTS1(nsShortReader, nsIRunnable)
nsresult
TestShortWrites(nsIInputStream* in, nsIOutputStream* out)
@ -316,7 +316,7 @@ TestShortWrites(nsIInputStream* in, nsIOutputStream* out)
class nsPump : public nsIRunnable
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_IMETHOD Run() {
nsresult rv;
@ -352,8 +352,7 @@ protected:
uint32_t mCount;
};
NS_IMPL_THREADSAFE_ISUPPORTS1(nsPump,
nsIRunnable)
NS_IMPL_ISUPPORTS1(nsPump, nsIRunnable)
nsresult
TestChainedPipes()

Просмотреть файл

@ -87,7 +87,7 @@ private:
class Factory MOZ_FINAL : public nsIFactory
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
Factory() : mFirstComponentCreated(false) { }
@ -102,12 +102,12 @@ public:
bool mFirstComponentCreated;
};
NS_IMPL_THREADSAFE_ISUPPORTS1(Factory, nsIFactory)
NS_IMPL_ISUPPORTS1(Factory, nsIFactory)
class Component1 MOZ_FINAL : public nsISupports
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
Component1() {
// This is the real test - make sure that only one instance is ever created.
@ -116,8 +116,8 @@ public:
}
};
NS_IMPL_THREADSAFE_ADDREF(Component1)
NS_IMPL_THREADSAFE_RELEASE(Component1)
NS_IMPL_ADDREF(Component1)
NS_IMPL_RELEASE(Component1)
NS_INTERFACE_MAP_BEGIN(Component1)
NS_INTERFACE_MAP_ENTRY(Component1)
@ -127,7 +127,7 @@ NS_INTERFACE_MAP_END
class Component2 MOZ_FINAL : public nsISupports
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
Component2() {
// This is the real test - make sure that only one instance is ever created.
@ -136,8 +136,8 @@ public:
}
};
NS_IMPL_THREADSAFE_ADDREF(Component2)
NS_IMPL_THREADSAFE_RELEASE(Component2)
NS_IMPL_ADDREF(Component2)
NS_IMPL_RELEASE(Component2)
NS_INTERFACE_MAP_BEGIN(Component2)
NS_INTERFACE_MAP_ENTRY(Component2)

Просмотреть файл

@ -16,7 +16,7 @@
class Task : public nsIRunnable
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
Task(int i) : mIndex(i) {}
@ -32,7 +32,7 @@ public:
private:
int mIndex;
};
NS_IMPL_THREADSAFE_ISUPPORTS1(Task, nsIRunnable)
NS_IMPL_ISUPPORTS1(Task, nsIRunnable)
static nsresult
RunTests()

Просмотреть файл

@ -48,11 +48,11 @@ static bool gAllThreadsShutDown = false;
class Listener MOZ_FINAL : public nsIThreadPoolListener
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSITHREADPOOLLISTENER
};
NS_IMPL_THREADSAFE_ISUPPORTS1(Listener, nsIThreadPoolListener)
NS_IMPL_ISUPPORTS1(Listener, nsIThreadPoolListener)
NS_IMETHODIMP
Listener::OnThreadCreated()

Просмотреть файл

@ -13,7 +13,7 @@
class nsRunner : public nsIRunnable {
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_IMETHOD Run() {
nsCOMPtr<nsIThread> thread;
@ -38,7 +38,7 @@ protected:
int mNum;
};
NS_IMPL_THREADSAFE_ISUPPORTS1(nsRunner, nsIRunnable)
NS_IMPL_ISUPPORTS1(nsRunner, nsIRunnable)
nsresult
TestThreads()
@ -75,7 +75,7 @@ TestThreads()
class nsStressRunner : public nsIRunnable {
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_IMETHOD Run() {
NS_ASSERTION(!mWasRun, "run twice!");
@ -106,7 +106,7 @@ protected:
int32_t nsStressRunner::gNum = 0;
NS_IMPL_THREADSAFE_ISUPPORTS1(nsStressRunner, nsIRunnable)
NS_IMPL_ISUPPORTS1(nsStressRunner, nsIRunnable)
static int Stress(int loops, int threads)
{

Просмотреть файл

@ -72,7 +72,7 @@ private:
class TimerCallback MOZ_FINAL : public nsITimerCallback
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
TimerCallback(nsIThread** aThreadPtr, ReentrantMonitor* aReentrantMonitor)
: mThreadPtr(aThreadPtr), mReentrantMonitor(aReentrantMonitor) { }
@ -94,7 +94,7 @@ private:
ReentrantMonitor* mReentrantMonitor;
};
NS_IMPL_THREADSAFE_ISUPPORTS1(TimerCallback, nsITimerCallback)
NS_IMPL_ISUPPORTS1(TimerCallback, nsITimerCallback)
nsresult
TestTargetedTimers()

Просмотреть файл

@ -334,12 +334,12 @@ LazyIdleThread::SelfDestruct()
delete this;
}
NS_IMPL_THREADSAFE_ADDREF(LazyIdleThread)
NS_IMPL_ADDREF(LazyIdleThread)
NS_IMETHODIMP_(nsrefcnt)
LazyIdleThread::Release()
{
nsrefcnt count = NS_AtomicDecrementRefcnt(mRefCnt);
nsrefcnt count = --mRefCnt;
NS_LOG_RELEASE(this, count, "LazyIdleThread");
if (!count) {
@ -363,11 +363,11 @@ LazyIdleThread::Release()
return count;
}
NS_IMPL_THREADSAFE_QUERY_INTERFACE5(LazyIdleThread, nsIThread,
nsIEventTarget,
nsITimerCallback,
nsIThreadObserver,
nsIObserver)
NS_IMPL_QUERY_INTERFACE5(LazyIdleThread, nsIThread,
nsIEventTarget,
nsITimerCallback,
nsIThreadObserver,
nsIObserver)
NS_IMETHODIMP
LazyIdleThread::Dispatch(nsIRunnable* aEvent,

Просмотреть файл

@ -38,7 +38,7 @@ class LazyIdleThread MOZ_FINAL : public nsIThread,
public nsIObserver
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIEVENTTARGET
NS_DECL_NSITHREAD
NS_DECL_NSITIMERCALLBACK

Просмотреть файл

@ -17,7 +17,7 @@
using namespace mozilla;
NS_IMPL_THREADSAFE_ISUPPORTS2(TimerThread, nsIRunnable, nsIObserver)
NS_IMPL_ISUPPORTS2(TimerThread, nsIRunnable, nsIObserver)
TimerThread::TimerThread() :
mInitInProgress(0),

Просмотреть файл

@ -30,7 +30,7 @@ public:
TimerThread();
NS_HIDDEN_(nsresult) InitLocks();
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIRUNNABLE
NS_DECL_NSIOBSERVER

Просмотреть файл

@ -14,7 +14,7 @@
using namespace mozilla;
NS_IMPL_THREADSAFE_ISUPPORTS1(nsEnvironment, nsIEnvironment)
NS_IMPL_ISUPPORTS1(nsEnvironment, nsIEnvironment)
nsresult
nsEnvironment::Create(nsISupports *aOuter, REFNSIID aIID,

Просмотреть файл

@ -18,7 +18,7 @@
class nsEnvironment MOZ_FINAL : public nsIEnvironment
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIENVIRONMENT
static nsresult Create(nsISupports *aOuter, REFNSIID aIID,

Просмотреть файл

@ -36,7 +36,7 @@ class nsProcess MOZ_FINAL : public nsIProcess,
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIPROCESS
NS_DECL_NSIOBSERVER

Просмотреть файл

@ -59,8 +59,8 @@ cpu_type_t pref_cpu_types[2] = {
//-------------------------------------------------------------------//
// nsIProcess implementation
//-------------------------------------------------------------------//
NS_IMPL_THREADSAFE_ISUPPORTS2(nsProcess, nsIProcess,
nsIObserver)
NS_IMPL_ISUPPORTS2(nsProcess, nsIProcess,
nsIObserver)
//Constructor
nsProcess::nsProcess()

Просмотреть файл

@ -130,8 +130,8 @@ nsThreadClassInfo::GetClassIDNoAlloc(nsCID *result)
//-----------------------------------------------------------------------------
NS_IMPL_THREADSAFE_ADDREF(nsThread)
NS_IMPL_THREADSAFE_RELEASE(nsThread)
NS_IMPL_ADDREF(nsThread)
NS_IMPL_RELEASE(nsThread)
NS_INTERFACE_MAP_BEGIN(nsThread)
NS_INTERFACE_MAP_ENTRY(nsIThread)
NS_INTERFACE_MAP_ENTRY(nsIThreadInternal)

Просмотреть файл

@ -21,7 +21,7 @@ class nsThread MOZ_FINAL : public nsIThreadInternal,
public nsISupportsPriority
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIEVENTTARGET
NS_DECL_NSITHREAD
NS_DECL_NSITHREADINTERNAL

Просмотреть файл

@ -37,8 +37,8 @@ GetThreadPoolLog()
#define DEFAULT_IDLE_THREAD_LIMIT 1
#define DEFAULT_IDLE_THREAD_TIMEOUT PR_SecondsToInterval(60)
NS_IMPL_THREADSAFE_ADDREF(nsThreadPool)
NS_IMPL_THREADSAFE_RELEASE(nsThreadPool)
NS_IMPL_ADDREF(nsThreadPool)
NS_IMPL_RELEASE(nsThreadPool)
NS_IMPL_CLASSINFO(nsThreadPool, NULL, nsIClassInfo::THREADSAFE,
NS_THREADPOOL_CID)
NS_IMPL_QUERY_INTERFACE3_CI(nsThreadPool, nsIThreadPool, nsIEventTarget,

Просмотреть файл

@ -20,7 +20,7 @@ class nsThreadPool MOZ_FINAL : public nsIThreadPool,
public nsIRunnable
{
public:
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIEVENTTARGET
NS_DECL_NSITHREADPOOL
NS_DECL_NSIRUNNABLE

Просмотреть файл

@ -188,15 +188,15 @@ void TimerEventAllocator::Free(void* aPtr)
} // anonymous namespace
NS_IMPL_THREADSAFE_QUERY_INTERFACE1(nsTimerImpl, nsITimer)
NS_IMPL_THREADSAFE_ADDREF(nsTimerImpl)
NS_IMPL_QUERY_INTERFACE1(nsTimerImpl, nsITimer)
NS_IMPL_ADDREF(nsTimerImpl)
NS_IMETHODIMP_(nsrefcnt) nsTimerImpl::Release(void)
{
nsrefcnt count;
MOZ_ASSERT(int32_t(mRefCnt) > 0, "dup release");
count = NS_AtomicDecrementRefcnt(mRefCnt);
count = --mRefCnt;
NS_LOG_RELEASE(this, count, "nsTimerImpl");
if (count == 0) {
mRefCnt = 1; /* stabilize */

Просмотреть файл

@ -57,7 +57,7 @@ public:
nsresult PostTimerEvent();
void SetDelayInternal(uint32_t aDelay);
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSITIMER
int32_t GetGeneration() { return mGeneration; }