Bug 484717 - Assert that our lock is held when the precondition says it should be

Use the new NSPR assertion to assert that a given PRLock is held when entering
a function.
r=asuth
This commit is contained in:
Shawn Wilsher 2009-03-26 16:33:35 -04:00
Родитель 1c4fdb275c
Коммит 5ea539378d
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -451,6 +451,7 @@ private:
nsresult BuildAndNotifyResults(sqlite3_stmt *aStatement)
{
NS_ASSERTION(mCallback, "Trying to dispatch results without a callback!");
PR_ASSERT_CURRENT_THREAD_OWNS_LOCK(mLock);
// At this point, it is safe to not hold the lock and allow for cancelation.
// We may add an event to the calling thread, but that thread will not end