From 30029587ee36fab42f9c520b98b1a1541939384e Mon Sep 17 00:00:00 2001 From: "warren%netscape.com" Date: Fri, 30 Apr 1999 22:55:16 +0000 Subject: [PATCH] Made Notify and Wait methods return nsresult. git-svn-id: svn://10.0.0.236/trunk@29904 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/base/public/nsAutoLock.h | 15 +++++++++------ mozilla/xpcom/threads/nsAutoLock.h | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/mozilla/base/public/nsAutoLock.h b/mozilla/base/public/nsAutoLock.h index ce56d781d7c..cee5790e893 100644 --- a/mozilla/base/public/nsAutoLock.h +++ b/mozilla/base/public/nsAutoLock.h @@ -140,16 +140,19 @@ public: PR_CExitMonitor(mLockObject); } - PRStatus Wait(PRIntervalTime interval = PR_INTERVAL_NO_TIMEOUT) { - return PR_CWait(mLockObject, interval); + nsresult Wait(PRIntervalTime interval = PR_INTERVAL_NO_TIMEOUT) { + return PR_CWait(mLockObject, interval) == PR_SUCCESS + ? NS_OK : NS_ERROR_FAILURE; } - PRStatus Notify() { - return PR_CNotify(mLockObject); + nsresult Notify() { + return PR_CNotify(mLockObject) == PR_SUCCESS + ? NS_OK : NS_ERROR_FAILURE; } - PRStatus NotifyAll() { - return PR_CNotifyAll(mLockObject); + nsresult NotifyAll() { + return PR_CNotifyAll(mLockObject) == PR_SUCCESS + ? NS_OK : NS_ERROR_FAILURE; } private: diff --git a/mozilla/xpcom/threads/nsAutoLock.h b/mozilla/xpcom/threads/nsAutoLock.h index ce56d781d7c..cee5790e893 100644 --- a/mozilla/xpcom/threads/nsAutoLock.h +++ b/mozilla/xpcom/threads/nsAutoLock.h @@ -140,16 +140,19 @@ public: PR_CExitMonitor(mLockObject); } - PRStatus Wait(PRIntervalTime interval = PR_INTERVAL_NO_TIMEOUT) { - return PR_CWait(mLockObject, interval); + nsresult Wait(PRIntervalTime interval = PR_INTERVAL_NO_TIMEOUT) { + return PR_CWait(mLockObject, interval) == PR_SUCCESS + ? NS_OK : NS_ERROR_FAILURE; } - PRStatus Notify() { - return PR_CNotify(mLockObject); + nsresult Notify() { + return PR_CNotify(mLockObject) == PR_SUCCESS + ? NS_OK : NS_ERROR_FAILURE; } - PRStatus NotifyAll() { - return PR_CNotifyAll(mLockObject); + nsresult NotifyAll() { + return PR_CNotifyAll(mLockObject) == PR_SUCCESS + ? NS_OK : NS_ERROR_FAILURE; } private: