Ignore:
Timestamp:
Jul 16, 2008, 12:58:38 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Geoff.

Check pthread_key_create return value.

This check was helpful when debugging a crash in run-webkit-tests --threaded that happened
because JSGlobalData objects were not deleted, and we were running out of pthread keys soon.
It also looks useful for production builds.

  • wtf/ThreadSpecific.h: (WTF::::ThreadSpecific):
File:
1 edited

Legend:

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

    r34810 r35194  
    6969inline ThreadSpecific<T>::ThreadSpecific()
    7070{
    71     pthread_key_create(&m_key, destroy);
     71    int error = pthread_key_create(&m_key, destroy);
     72    if (error)
     73        CRASH();
    7274}
    7375
Note: See TracChangeset for help on using the changeset viewer.