Bug 482938. nsPipe should create and destroy monitors using nsAutoMonitor so the potential-deadlock detector doesn't get confused. r=bsmedberg

--HG--
extra : rebase_source : 76fca82ad7015f55fb09e30d282f3dedf0c3976b
This commit is contained in:
Robert O'Callahan 2009-03-19 09:18:19 +13:00
parent ef535464ab
commit 98e0044197

View File

@ -330,7 +330,7 @@ nsPipe::nsPipe()
nsPipe::~nsPipe()
{
if (mMonitor)
PR_DestroyMonitor(mMonitor);
nsAutoMonitor::DestroyMonitor(mMonitor);
}
NS_IMPL_THREADSAFE_ISUPPORTS1(nsPipe, nsIPipe)
@ -342,7 +342,7 @@ nsPipe::Init(PRBool nonBlockingIn,
PRUint32 segmentCount,
nsIMemory *segmentAlloc)
{
mMonitor = PR_NewMonitor();
mMonitor = nsAutoMonitor::NewMonitor("pipeMonitor");
if (!mMonitor)
return NS_ERROR_OUT_OF_MEMORY;