Ignore:
Timestamp:
Nov 21, 2008, 1:20:41 PM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Dan Bernstein.

https://bugs.webkit.org/show_bug.cgi?id=22402
Replace abort() with CRASH()

  • wtf/Assertions.h: Added a different method to crash, which should work even is 0xbbadbeef is a valid memory address.
  • runtime/Collector.cpp:
  • wtf/FastMalloc.cpp:
  • wtf/FastMalloc.h:
  • wtf/TCSpinLock.h: Replace abort() with CRASH().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/TCSpinLock.h

    r38672 r38673  
    4747#include <sys/types.h>
    4848#endif
    49 #include <stdlib.h>     /* for abort() */
    5049
    5150#if PLATFORM(WIN_OS)
     
    200199
    201200  inline void Init() {
    202     if (pthread_mutex_init(&private_lock_, NULL) != 0) abort();
     201    if (pthread_mutex_init(&private_lock_, NULL) != 0) CRASH();
    203202  }
    204203  inline void Finalize() {
    205     if (pthread_mutex_destroy(&private_lock_) != 0) abort();
     204    if (pthread_mutex_destroy(&private_lock_) != 0) CRASH();
    206205  }
    207206  inline void Lock() {
    208     if (pthread_mutex_lock(&private_lock_) != 0) abort();
     207    if (pthread_mutex_lock(&private_lock_) != 0) CRASH();
    209208  }
    210209  inline void Unlock() {
    211     if (pthread_mutex_unlock(&private_lock_) != 0) abort();
     210    if (pthread_mutex_unlock(&private_lock_) != 0) CRASH();
    212211  }
    213212};
Note: See TracChangeset for help on using the changeset viewer.