Ignore:
Timestamp:
May 13, 2009, 3:09:21 PM (16 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2009-05-13 Dmitry Titov <[email protected]>

Rubber-stamped by Mark Rowe.

https://bugs.webkit.org/show_bug.cgi?id=25746
Revert http://trac.webkit.org/changeset/43507 which caused crash in PPC nightlies with Safari 4.

  • JavaScriptCore.exp:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
  • bytecode/SamplingTool.cpp: (JSC::SamplingThread::start): (JSC::SamplingThread::stop):
  • bytecode/SamplingTool.h:
  • wtf/CrossThreadRefCounted.h: (WTF::CrossThreadRefCounted::CrossThreadRefCounted): (WTF::::ref): (WTF::::deref):
  • wtf/Threading.h:
  • wtf/ThreadingNone.cpp:
  • wtf/ThreadingPthreads.cpp: (WTF::threadMapMutex): (WTF::initializeThreading): (WTF::threadMap): (WTF::identifierByPthreadHandle): (WTF::establishIdentifierForPthreadHandle): (WTF::pthreadHandleForIdentifier): (WTF::clearPthreadHandleForIdentifier): (WTF::createThreadInternal): (WTF::waitForThreadCompletion): (WTF::detachThread): (WTF::currentThread):
  • wtf/ThreadingWin.cpp: (WTF::threadMapMutex): (WTF::initializeThreading): (WTF::threadMap): (WTF::storeThreadHandleByIdentifier): (WTF::threadHandleForIdentifier): (WTF::clearThreadHandleForIdentifier): (WTF::createThreadInternal): (WTF::waitForThreadCompletion): (WTF::detachThread): (WTF::currentThread):
  • wtf/gtk/ThreadingGtk.cpp: (WTF::threadMapMutex): (WTF::initializeThreading): (WTF::threadMap): (WTF::identifierByGthreadHandle): (WTF::establishIdentifierForThread): (WTF::threadForIdentifier): (WTF::clearThreadForIdentifier): (WTF::createThreadInternal): (WTF::waitForThreadCompletion): (WTF::currentThread):
  • wtf/qt/ThreadingQt.cpp: (WTF::threadMapMutex): (WTF::threadMap): (WTF::identifierByQthreadHandle): (WTF::establishIdentifierForThread): (WTF::clearThreadForIdentifier): (WTF::threadForIdentifier): (WTF::initializeThreading): (WTF::createThreadInternal): (WTF::waitForThreadCompletion): (WTF::currentThread):

WebCore:

2009-05-13 Dmitry Titov <[email protected]>

Rubber-stamped by Mark Rowe.

https://bugs.webkit.org/show_bug.cgi?id=25746
Revert http://trac.webkit.org/changeset/43507 which caused crash in PPC nightlies with Safari 4.

  • dom/XMLTokenizerLibxml2.cpp: (WebCore::matchFunc): (WebCore::openFunc): (WebCore::createStringParser): (WebCore::createMemoryParser):
  • loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::open):
  • platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::SQLiteDatabase): (WebCore::SQLiteDatabase::close):
  • storage/DatabaseThread.cpp: (WebCore::DatabaseThread::DatabaseThread): (WebCore::DatabaseThread::start): (WebCore::DatabaseThread::databaseThread):
  • storage/LocalStorageThread.cpp: (WebCore::LocalStorageThread::LocalStorageThread): (WebCore::LocalStorageThread::start): (WebCore::LocalStorageThread::localStorageThread): (WebCore::LocalStorageThread::scheduleImport): (WebCore::LocalStorageThread::scheduleSync): (WebCore::LocalStorageThread::terminate):
  • workers/WorkerThread.cpp: (WebCore::WorkerThread::WorkerThread): (WebCore::WorkerThread::start):

WebKit/win:

2009-05-13 Dmitry Titov <[email protected]>

Rubber-stamped by Mark Rowe.

https://bugs.webkit.org/show_bug.cgi?id=25746
Revert http://trac.webkit.org/changeset/43507 which caused crash in PPC nightlies with Safari 4.

  • WebKit.vcproj/WebKit.def:
  • WebKit.vcproj/WebKit_debug.def:
File:
1 edited

Legend:

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

    r43507 r43663  
    8686typedef struct _GMutex GMutex;
    8787typedef struct _GCond GCond;
    88 typedef struct _GThread GThread;
    8988#endif
    9089
     
    9392QT_BEGIN_NAMESPACE
    9493class QMutex;
    95 class QThread;
    9694class QWaitCondition;
    9795QT_END_NAMESPACE
     
    108106namespace WTF {
    109107
     108typedef uint32_t ThreadIdentifier;
     109typedef void* (*ThreadFunction)(void* argument);
     110
     111// Returns 0 if thread creation failed.
     112// The thread name must be a literal since on some platforms it's passed in to the thread.
     113ThreadIdentifier createThread(ThreadFunction, void*, const char* threadName);
     114
     115// Internal platform-specific createThread implementation.
     116ThreadIdentifier createThreadInternal(ThreadFunction, void*, const char* threadName);
     117
     118// Called in the thread during initialization.
     119// Helpful for platforms where the thread name must be set from within the thread.
     120void setThreadNameInternal(const char* threadName);
     121
     122ThreadIdentifier currentThread();
     123bool isMainThread();
     124int waitForThreadCompletion(ThreadIdentifier, void**);
     125void detachThread(ThreadIdentifier);
     126
    110127#if USE(PTHREADS)
    111128typedef pthread_mutex_t PlatformMutex;
    112129typedef pthread_cond_t PlatformCondition;
    113 typedef pthread_t PlatformThreadIdentifier;
    114130#elif PLATFORM(GTK)
    115131typedef GOwnPtr<GMutex> PlatformMutex;
    116132typedef GOwnPtr<GCond> PlatformCondition;
    117 typedef GThread* PlatformThreadIdentifier;
    118133#elif PLATFORM(QT)
    119134typedef QT_PREPEND_NAMESPACE(QMutex)* PlatformMutex;
    120135typedef QT_PREPEND_NAMESPACE(QWaitCondition)* PlatformCondition;
    121 typedef QT_PREPEND_NAMESPACE(QThread)* PlatformThreadIdentifier;
    122136#elif PLATFORM(WIN_OS)
    123137struct PlatformMutex {
     
    136150    void signal(bool unblockAll);
    137151};
    138 typedef unsigned PlatformThreadIdentifier;
    139152#else
    140153typedef void* PlatformMutex;
     
    142155#endif
    143156   
    144 // Platform-independent wrapper for thread id. Assignable and copyable.
    145 // A valid ThreadIdentifier is usually returned from createThread(...) or currentThread() functions.
    146 // ThreadIdentifier remains valid for as long as its thread is alive and is not automatically invalidated
    147 // when thread terminates. Since platform-dependent thread ids can be recycled, stale ThreadIdentifier
    148 // may reference a completely unrelated thread after its original thread terminates.
    149 class ThreadIdentifier {
    150 public:
    151     ThreadIdentifier()
    152         : m_platformId(0)
    153     {
    154         ASSERT(!isValid());
    155     }
    156 
    157     explicit ThreadIdentifier(PlatformThreadIdentifier platformId)
    158         : m_platformId(platformId)
    159     {
    160         ASSERT(isValid());
    161     }
    162 
    163     bool isValid() const  { return m_platformId; }
    164     void invalidate() { m_platformId = 0; }
    165 
    166     bool operator==(const ThreadIdentifier&) const;
    167     bool operator!=(const ThreadIdentifier&) const;
    168 
    169     PlatformThreadIdentifier platformId() const { return m_platformId;  }
    170 
    171 private:
    172     PlatformThreadIdentifier m_platformId;
    173 };
    174 
    175 typedef void* (*ThreadFunction)(void* argument);
    176 
    177 // Returns invalid identifier if thread creation failed.
    178 // The thread name must be a literal since on some platforms it's passed in to the thread.
    179 ThreadIdentifier createThread(ThreadFunction, void*, const char* threadName);
    180 
    181 // Internal platform-specific createThread implementation.
    182 ThreadIdentifier createThreadInternal(ThreadFunction, void*, const char* threadName);
    183 
    184 // Called in the thread during initialization.
    185 // Helpful for platforms where the thread name must be set from within the thread.
    186 void setThreadNameInternal(const char* threadName);
    187 
    188 ThreadIdentifier currentThread();
    189 bool isMainThread();
    190 int waitForThreadCompletion(ThreadIdentifier, void**);
    191 void detachThread(ThreadIdentifier);
    192 
    193157class Mutex : Noncopyable {
    194158public:
Note: See TracChangeset for help on using the changeset viewer.