Bug 1437604 - remove NS_INTERFACE_MAP_END_THREADSAFE; r=mystor

This macro is identical to NS_INTERFACE_MAP_END and encourages the
reader to think that there's something extra-special threadsafe about QI
implementations that use the macro, when in reality there's nothing of
the sort.
This commit is contained in:
Nathan Froyd 2018-02-12 14:36:46 -05:00
Родитель 2fb5002bb1
Коммит 0f56acaf26
18 изменённых файлов: 21 добавлений и 29 удалений

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

@ -18,7 +18,7 @@ NS_INTERFACE_MAP_BEGIN(nsRefreshTimer)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsITimerCallback)
NS_INTERFACE_MAP_ENTRY(nsITimerCallback)
NS_INTERFACE_MAP_ENTRY(nsINamed)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
nsRefreshTimer::nsRefreshTimer(nsDocShell* aDocShell,
nsIURI* aURI,

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

@ -41,7 +41,7 @@ NS_INTERFACE_MAP_BEGIN(nsBaseContentStream)
NS_INTERFACE_MAP_ENTRY(nsIInputStream)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIAsyncInputStream, mNonBlocking)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIInputStream)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
//-----------------------------------------------------------------------------
// nsBaseContentStream::nsIInputStream

8
netwerk/cache/nsCacheEntryDescriptor.cpp поставляемый
Просмотреть файл

@ -698,7 +698,7 @@ nsCacheEntryDescriptor::nsInputStreamWrapper::Release()
NS_INTERFACE_MAP_BEGIN(nsCacheEntryDescriptor::nsInputStreamWrapper)
NS_INTERFACE_MAP_ENTRY(nsIInputStream)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
nsresult nsCacheEntryDescriptor::
nsInputStreamWrapper::LazyInit()
@ -892,7 +892,7 @@ nsCacheEntryDescriptor::nsDecompressInputStreamWrapper::Release()
NS_INTERFACE_MAP_BEGIN(nsCacheEntryDescriptor::nsDecompressInputStreamWrapper)
NS_INTERFACE_MAP_ENTRY(nsIInputStream)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
NS_IMETHODIMP nsCacheEntryDescriptor::
nsDecompressInputStreamWrapper::Read(char * buf,
@ -1078,7 +1078,7 @@ nsCacheEntryDescriptor::nsOutputStreamWrapper::Release()
NS_INTERFACE_MAP_BEGIN(nsCacheEntryDescriptor::nsOutputStreamWrapper)
NS_INTERFACE_MAP_ENTRY(nsIOutputStream)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
nsresult nsCacheEntryDescriptor::
nsOutputStreamWrapper::LazyInit()
@ -1308,7 +1308,7 @@ nsCacheEntryDescriptor::nsCompressOutputStreamWrapper::Release()
NS_INTERFACE_MAP_BEGIN(nsCacheEntryDescriptor::nsCompressOutputStreamWrapper)
NS_INTERFACE_MAP_ENTRY(nsIOutputStream)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
NS_IMETHODIMP nsCacheEntryDescriptor::
nsCompressOutputStreamWrapper::Write(const char * buf,

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

@ -172,7 +172,7 @@ NS_INTERFACE_MAP_BEGIN(CacheFile)
NS_INTERFACE_MAP_ENTRY(mozilla::net::CacheFileMetadataListener)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports,
mozilla::net::CacheFileChunkListener)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
CacheFile::CacheFile()
: mLock("CacheFile.mLock")

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

@ -330,7 +330,7 @@ CacheFileChunk::Release()
NS_INTERFACE_MAP_BEGIN(CacheFileChunk)
NS_INTERFACE_MAP_ENTRY(mozilla::net::CacheFileIOListener)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
CacheFileChunk::CacheFileChunk(CacheFile *aFile, uint32_t aIndex,
bool aInitByWriter)

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

@ -108,7 +108,7 @@ CacheFileHandle::Release()
NS_INTERFACE_MAP_BEGIN(CacheFileHandle)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
CacheFileHandle::CacheFileHandle(const SHA1Sum::Hash *aHash, bool aPriority, PinningStatus aPinning)
: mHash(aHash)

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

@ -40,7 +40,7 @@ NS_INTERFACE_MAP_BEGIN(CacheFileInputStream)
NS_INTERFACE_MAP_ENTRY(nsISeekableStream)
NS_INTERFACE_MAP_ENTRY(mozilla::net::CacheFileChunkListener)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIInputStream)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
CacheFileInputStream::CacheFileInputStream(CacheFile *aFile,
nsISupports *aEntry,

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

@ -42,7 +42,7 @@ NS_INTERFACE_MAP_BEGIN(CacheFileOutputStream)
NS_INTERFACE_MAP_ENTRY(nsISeekableStream)
NS_INTERFACE_MAP_ENTRY(mozilla::net::CacheFileChunkListener)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIOutputStream)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
CacheFileOutputStream::CacheFileOutputStream(CacheFile *aFile,
CacheOutputCloseListener *aCloseListener,

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

@ -255,7 +255,7 @@ NS_IMPL_RELEASE(CacheIndex)
NS_INTERFACE_MAP_BEGIN(CacheIndex)
NS_INTERFACE_MAP_ENTRY(mozilla::net::CacheFileIOListener)
NS_INTERFACE_MAP_ENTRY(nsIRunnable)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
CacheIndex::CacheIndex()

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

@ -12,7 +12,7 @@ NS_INTERFACE_MAP_BEGIN(nsHtml5StreamListener)
NS_INTERFACE_MAP_ENTRY(nsIRequestObserver)
NS_INTERFACE_MAP_ENTRY(nsIStreamListener)
NS_INTERFACE_MAP_ENTRY(nsIThreadRetargetableStreamListener)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
nsHtml5StreamListener::nsHtml5StreamListener(nsHtml5StreamParser* aDelegate)
: mDelegate(aDelegate)

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

@ -25,7 +25,7 @@ NS_INTERFACE_MAP_BEGIN(nsPrintProgress)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIPrintProgress)
NS_INTERFACE_MAP_ENTRY(nsIPrintProgress)
NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
nsPrintProgress::nsPrintProgress(nsIPrintSettings* aPrintSettings)

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

@ -15,7 +15,7 @@ NS_IMPL_RELEASE(nsSystemAlertsService)
NS_INTERFACE_MAP_BEGIN(nsSystemAlertsService)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIAlertsService)
NS_INTERFACE_MAP_ENTRY(nsIAlertsService)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
nsSystemAlertsService::nsSystemAlertsService()
= default;

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

@ -167,7 +167,7 @@ NS_INTERFACE_MAP_BEGIN(nsDocumentOpenInfo)
NS_INTERFACE_MAP_ENTRY(nsIRequestObserver)
NS_INTERFACE_MAP_ENTRY(nsIStreamListener)
NS_INTERFACE_MAP_ENTRY(nsIThreadRetargetableStreamListener)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
nsDocumentOpenInfo::nsDocumentOpenInfo()
{

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

@ -13,7 +13,7 @@ NS_IMPL_RELEASE(nsDecodeAppleFile)
NS_INTERFACE_MAP_BEGIN(nsDecodeAppleFile)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIOutputStream)
NS_INTERFACE_MAP_ENTRY(nsIOutputStream)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
nsDecodeAppleFile::nsDecodeAppleFile()
{

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

@ -1196,7 +1196,7 @@ NS_INTERFACE_MAP_BEGIN(nsExternalAppHandler)
NS_INTERFACE_MAP_ENTRY(nsICancelable)
NS_INTERFACE_MAP_ENTRY(nsIBackgroundFileSaverObserver)
NS_INTERFACE_MAP_ENTRY(nsINamed)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
nsExternalAppHandler::nsExternalAppHandler(nsIMIMEInfo * aMIMEInfo,
const nsACString& aTempFileExtension,

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

@ -86,7 +86,7 @@ NS_INTERFACE_MAP_BEGIN(nsExtProtocolChannel)
NS_INTERFACE_MAP_ENTRY(nsIParentChannel)
NS_INTERFACE_MAP_ENTRY(nsIStreamListener)
NS_INTERFACE_MAP_ENTRY(nsIRequestObserver)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
nsExtProtocolChannel::nsExtProtocolChannel(nsIURI* aURI,
nsILoadInfo* aLoadInfo)
@ -491,7 +491,7 @@ NS_INTERFACE_MAP_BEGIN(nsExternalProtocolHandler)
NS_INTERFACE_MAP_ENTRY(nsIProtocolHandler)
NS_INTERFACE_MAP_ENTRY(nsIExternalProtocolHandler)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
NS_IMETHODIMP nsExternalProtocolHandler::GetScheme(nsACString &aScheme)
{

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

@ -23,7 +23,7 @@ NS_INTERFACE_MAP_BEGIN(nsMIMEInfoBase)
// This is only an nsIMIMEInfo if it's a MIME handler.
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIMIMEInfo, mClass == eMIMEInfo)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIHandlerInfo)
NS_INTERFACE_MAP_END_THREADSAFE
NS_INTERFACE_MAP_END
// nsMIMEInfoImpl methods

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

@ -1220,14 +1220,6 @@ NS_IMETHODIMP_(MozExternalRefCountType) Class::Release(void) \
///////////////////////////////////////////////////////////////////////////////
/**
*
* Threadsafe implementations of the ISupports convenience macros.
*
* @note These are not available when linking against the standalone glue,
* because the implementation requires PR_ symbols.
*/
#define NS_INTERFACE_MAP_END_THREADSAFE NS_IMPL_QUERY_TAIL_GUTS
/**
* Macro to generate nsIClassInfo methods for classes which do not have