Ignore:
Timestamp:
Aug 13, 2008, 1:00:51 PM (17 years ago)
Author:
[email protected]
Message:

2008-08-13 Alp Toker <[email protected]>

Reviewed by Eric Seidel.

https://bugs.webkit.org/show_bug.cgi?id=20349
WTF::initializeThreading() fails if threading is already initialized

Fix threading initialization logic to support cases where
g_thread_init() has already been called elsewhere.

Resolves database-related crashers reported in several applications.

  • wtf/ThreadingGtk.cpp: (WTF::initializeThreading):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/ThreadingGtk.cpp

    r35419 r35726  
    5050void initializeThreading()
    5151{
    52     if (!g_thread_supported()) {
     52    if (!g_thread_supported())
    5353        g_thread_init(NULL);
    54         ASSERT(!atomicallyInitializedStaticMutex);
     54    ASSERT(g_thread_supported());
     55
     56    if (!atomicallyInitializedStaticMutex) {
    5557        atomicallyInitializedStaticMutex = new Mutex;
    5658        threadMapMutex();
     
    5860        mainThreadIdentifier = currentThread();
    5961    }
    60     ASSERT(g_thread_supported());
    6162}
    6263
Note: See TracChangeset for help on using the changeset viewer.