зеркало из https://github.com/mozilla/gecko-dev.git
The code should not have actual functions in the assertions.
The patch is contributed by Matthew Zahorik <maz@albany.net>.
This commit is contained in:
Родитель
26becb7637
Коммит
16f50a38b9
|
@ -34,7 +34,8 @@ PR_IMPLEMENT(PRCondVar*)
|
|||
if( NULL != cv )
|
||||
{
|
||||
cv->lock = lock;
|
||||
PR_ASSERT((cv->isem = create_sem( 1, "nspr_sem")) >= B_NO_ERROR );
|
||||
cv->isem = create_sem( 1, "nspr_sem");
|
||||
PR_ASSERT( cv->isem >= B_NO_ERROR );
|
||||
}
|
||||
return cv;
|
||||
} /* PR_NewCondVar */
|
||||
|
@ -48,7 +49,10 @@ PR_IMPLEMENT(PRCondVar*)
|
|||
PR_IMPLEMENT(void)
|
||||
PR_DestroyCondVar (PRCondVar *cvar)
|
||||
{
|
||||
PR_ASSERT( delete_sem( cvar->isem ) == B_NO_ERROR );
|
||||
status_t result;
|
||||
|
||||
result = delete_sem( cvar->isem );
|
||||
PR_ASSERT( result == B_NO_ERROR );
|
||||
PR_DELETE( cvar );
|
||||
}
|
||||
|
||||
|
|
|
@ -53,8 +53,11 @@ PR_IMPLEMENT(PRLock*)
|
|||
PR_IMPLEMENT(void)
|
||||
PR_DestroyLock (PRLock* lock)
|
||||
{
|
||||
status_t result;
|
||||
|
||||
PR_ASSERT(NULL != lock);
|
||||
PR_ASSERT(delete_sem(lock->semaphoreID) == B_NO_ERROR);
|
||||
result = delete_sem(lock->semaphoreID);
|
||||
PR_ASSERT(result == B_NO_ERROR);
|
||||
PR_DELETE(lock);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,8 +42,11 @@ PR_IMPLEMENT(PRSemaphore*)
|
|||
PR_IMPLEMENT(void)
|
||||
PR_DestroySem (PRSemaphore *sem)
|
||||
{
|
||||
status_t result;
|
||||
|
||||
PR_ASSERT(sem != NULL);
|
||||
PR_ASSERT(delete_sem(sem->sem) == B_NO_ERROR);
|
||||
result = delete_sem(sem->sem);
|
||||
PR_ASSERT(result == B_NO_ERROR);
|
||||
PR_DELETE(sem);
|
||||
}
|
||||
|
||||
|
@ -79,8 +82,11 @@ PR_IMPLEMENT(PRStatus)
|
|||
PR_IMPLEMENT(void)
|
||||
PR_PostSem (PRSemaphore *sem)
|
||||
{
|
||||
status_t result;
|
||||
|
||||
PR_ASSERT(sem != NULL);
|
||||
PR_ASSERT(release_sem(sem->sem) == B_NO_ERROR);
|
||||
result = release_sem(sem->sem);
|
||||
PR_ASSERT(result == B_NO_ERROR);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -198,7 +198,8 @@ _bt_root (void* arg)
|
|||
/* Set within the current thread the pointer to our object. This
|
||||
object will be deleted when the thread termintates. */
|
||||
|
||||
PR_ASSERT( PR_SetThreadPrivate( 0, (void *) thred ) == PR_SUCCESS );
|
||||
result = PR_SetThreadPrivate( 0, (void *) thred );
|
||||
PR_ASSERT( result == PR_SUCCESS );
|
||||
|
||||
thred->startFunc(thred->arg); /* run the dang thing */
|
||||
|
||||
|
@ -266,7 +267,8 @@ _bt_root (void* arg)
|
|||
/* delete the thread object */
|
||||
PR_DELETE(thred);
|
||||
|
||||
PR_ASSERT( PR_SetThreadPrivate( (PRUint8) 0, (void *) NULL ) == PR_SUCCESS );
|
||||
result = PR_SetThreadPrivate( (PRUint8) 0, (void *) NULL );
|
||||
PR_ASSERT( result == PR_SUCCESS );
|
||||
exit_thread( NULL );
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче