From 52e30238cfe523b35b246739770e5febfe462045 Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Fri, 10 Sep 2004 06:02:07 +0000 Subject: [PATCH] Fixing nondebug mAddr is a debug paranoia thing. git-svn-id: svn://10.0.0.236/trunk@162056 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/threads/nsAutoLock.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/xpcom/threads/nsAutoLock.cpp b/mozilla/xpcom/threads/nsAutoLock.cpp index d9d7c8b27c3..df89408c292 100644 --- a/mozilla/xpcom/threads/nsAutoLock.cpp +++ b/mozilla/xpcom/threads/nsAutoLock.cpp @@ -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);