Changeset 21122 in webkit for trunk/JavaScriptCore/kjs/JSLock.cpp


Ignore:
Timestamp:
Apr 26, 2007, 2:15:26 PM (18 years ago)
Author:
ddkilzer
Message:

2007-04-25 David Kilzer <[email protected]>

Reviewed by Maciej.

Add assertions for debug builds.

  • kjs/JSLock.cpp: (KJS::JSLock::lock): Assert the return value of pthread_mutex_lock() in debug builds. (KJS::JSLock::unlock): Assert the return value of pthread_mutex_unlock() in debug builds.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/JSLock.cpp

    r20361 r21122  
    5353
    5454    if (!pthread_getspecific(didLockJSMutex)) {
    55         pthread_mutex_lock(&JSMutex);
     55        int result;
     56        result = pthread_mutex_lock(&JSMutex);
     57        ASSERT(!result);
    5658        pthread_setspecific(didLockJSMutex, &didLockJSMutex);
    5759    }
     
    6769    if (!JSLockCount) {
    6870        pthread_setspecific(didLockJSMutex, 0);
    69         pthread_mutex_unlock(&JSMutex);
     71        int result;
     72        result = pthread_mutex_unlock(&JSMutex);
     73        ASSERT(!result);
    7074    }
    7175}
Note: See TracChangeset for help on using the changeset viewer.