Fixing nondebug mAddr is a debug paranoia thing.

git-svn-id: svn://10.0.0.236/trunk@162056 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
timeless%mozdev.org
2004-09-10 06:02:07 +00:00
parent aa6bbecd26
commit 52e30238cf

View File

@@ -378,11 +378,11 @@ void nsAutoMonitor::DestroyMonitor(PRMonitor* mon)
void nsAutoMonitor::Enter()
{
#ifdef DEBUG
if (!mAddr) {
NS_ERROR("It is not legal to enter a null monitor");
return;
}
#ifdef DEBUG
nsAutoLockBase* stackTop =
(nsAutoLockBase*) PR_GetThreadPrivate(LockStackTPI);
NS_ASSERTION(stackTop == mDown, "non-LIFO nsAutoMonitor::Enter");
@@ -395,11 +395,11 @@ void nsAutoMonitor::Enter()
void nsAutoMonitor::Exit()
{
#ifdef DEBUG
if (!mAddr) {
NS_ERROR("It is not legal to exit a null monitor");
return;
}
#ifdef DEBUG
(void) PR_SetThreadPrivate(LockStackTPI, mDown);
#endif
PRStatus status = PR_ExitMonitor(mMonitor);