Changeset 48731 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Sep 24, 2009, 2:15:22 PM (16 years ago)
Author:
[email protected]
Message:

Fix FastMalloc to build with assertions enabled.

Reviewed by Gavin Barraclough.

  • wtf/FastMalloc.cpp:

(WTF::TCMalloc_Central_FreeList::ReleaseToSpans):

  • wtf/TCSpinLock.h:

(TCMalloc_SpinLock::IsHeld):

Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r48727 r48731  
     12009-09-24  Mark Rowe  <[email protected]>
     2
     3        Reviewed by Gavin Barraclough.
     4
     5        Fix FastMalloc to build with assertions enabled.
     6
     7        * wtf/FastMalloc.cpp:
     8        (WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
     9        * wtf/TCSpinLock.h:
     10        (TCMalloc_SpinLock::IsHeld):
     11
    1122009-09-24  Geoffrey Garen  <[email protected]>
    213
  • trunk/JavaScriptCore/wtf/FastMalloc.cpp

    r47664 r48731  
    23892389  if (false) {
    23902390    // Check that object does not occur in list
    2391     int got = 0;
     2391    unsigned got = 0;
    23922392    for (void* p = span->objects; p != NULL; p = *((void**) p)) {
    23932393      ASSERT(p != object);
  • trunk/JavaScriptCore/wtf/TCSpinLock.h

    r38673 r48731  
    210210    if (pthread_mutex_unlock(&private_lock_) != 0) CRASH();
    211211  }
     212  bool IsHeld() {
     213    if (pthread_mutex_trylock(&private_lock_))
     214      return true;
     215
     216    Unlock();
     217    return false;
     218  }
    212219};
    213220
Note: See TracChangeset for help on using the changeset viewer.