Changeset 35726 in webkit for trunk/JavaScriptCore


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):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r35714 r35726  
     12008-08-13  Alp Toker  <[email protected]>
     2
     3        Reviewed by Eric Seidel.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=20349
     6        WTF::initializeThreading() fails if threading is already initialized
     7
     8        Fix threading initialization logic to support cases where
     9        g_thread_init() has already been called elsewhere.
     10
     11        Resolves database-related crashers reported in several applications.
     12
     13        * wtf/ThreadingGtk.cpp:
     14        (WTF::initializeThreading):
     15
    1162008-08-13  Brad Hughes <[email protected]>
    217
  • 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.