mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bugzilla bug #82436: assert that lock is not NULL in PR_Lock and PR_Unlock
to avoid crashing in an assertion statement like PR_ASSERT(lock->owner != me) if lock is NULL.
This commit is contained in:
parent
21b77a4d22
commit
f864ebcadb
@ -230,6 +230,7 @@ PR_IMPLEMENT(void) PR_Lock(PRLock *lock)
|
||||
#if !defined(XP_MAC)
|
||||
PR_ASSERT(!(me->flags & _PR_IDLE_THREAD));
|
||||
#endif
|
||||
PR_ASSERT(lock != NULL);
|
||||
#ifdef _PR_GLOBAL_THREADS_ONLY
|
||||
PR_ASSERT(lock->owner != me);
|
||||
_PR_MD_LOCK(&lock->ilock);
|
||||
@ -336,6 +337,7 @@ PR_IMPLEMENT(PRStatus) PR_Unlock(PRLock *lock)
|
||||
PRIntn is;
|
||||
PRThread *me = _PR_MD_CURRENT_THREAD();
|
||||
|
||||
PR_ASSERT(lock != NULL);
|
||||
PR_ASSERT(lock->owner == me);
|
||||
PR_ASSERT(me != suspendAllThread);
|
||||
#if !defined(XP_MAC)
|
||||
|
Loading…
Reference in New Issue
Block a user