bug #21556. Gave nsHTTPChannel, nsHTTPResponseListener, nsHTTPRequest and nsHTTPEncodeStream thread-safe implementations of AddRef() and Release() since those methods are called on multiple threads...

This commit is contained in:
rpotts%netscape.com 2000-02-23 04:38:42 +00:00
Родитель 7a3434358f
Коммит af2ce4b071
4 изменённых файлов: 21 добавлений и 10 удалений

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

@ -136,12 +136,15 @@ nsHTTPChannel::~nsHTTPChannel()
CRTFREEIF(mProxy);
}
NS_IMPL_ISUPPORTS5(nsHTTPChannel,
nsIHTTPChannel,
nsIChannel,
nsIInterfaceRequestor,
nsIProgressEventSink,
nsIProxy);
NS_IMPL_THREADSAFE_ADDREF(nsHTTPChannel)
NS_IMPL_THREADSAFE_RELEASE(nsHTTPChannel)
NS_IMPL_QUERY_INTERFACE5(nsHTTPChannel,
nsIHTTPChannel,
nsIChannel,
nsIInterfaceRequestor,
nsIProgressEventSink,
nsIProxy);
////////////////////////////////////////////////////////////////////////////////
// nsIRequest methods:

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

@ -45,7 +45,10 @@ nsHTTPEncodeStream::~nsHTTPEncodeStream()
{
}
NS_IMPL_ISUPPORTS2(nsHTTPEncodeStream, nsIInputStream, nsISeekableStream);
NS_IMPL_THREADSAFE_ADDREF(nsHTTPEncodeStream);
NS_IMPL_THREADSAFE_RELEASE(nsHTTPEncodeStream);
NS_IMPL_QUERY_INTERFACE2(nsHTTPEncodeStream, nsIInputStream, nsISeekableStream);
NS_METHOD
nsHTTPEncodeStream::Create(nsIInputStream *rawStream, PRUint32 flags,

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

@ -149,8 +149,8 @@ nsHTTPRequest::~nsHTTPRequest()
////////////////////////////////////////////////////////////////////////////////
// nsISupports methods:
NS_IMPL_ADDREF(nsHTTPRequest);
NS_IMPL_RELEASE(nsHTTPRequest);
NS_IMPL_THREADSAFE_ADDREF(nsHTTPRequest);
NS_IMPL_THREADSAFE_RELEASE(nsHTTPRequest);
NS_IMETHODIMP
nsHTTPRequest::QueryInterface(REFNSIID aIID, void** aInstancePtr)

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

@ -84,7 +84,12 @@ nsHTTPResponseListener::~nsHTTPResponseListener()
NS_IF_RELEASE(mResponse);
}
NS_IMPL_ISUPPORTS2(nsHTTPResponseListener, nsIStreamListener, nsIStreamObserver);
NS_IMPL_THREADSAFE_ADDREF(nsHTTPResponseListener)
NS_IMPL_THREADSAFE_RELEASE(nsHTTPResponseListener)
NS_IMPL_QUERY_INTERFACE2(nsHTTPResponseListener,
nsIStreamListener,
nsIStreamObserver);
static NS_DEFINE_IID(kProxyObjectManagerIID, NS_IPROXYEVENT_MANAGER_IID);
static NS_DEFINE_CID(kEventQueueService, NS_EVENTQUEUESERVICE_CID);