Ignore:
Timestamp:
Nov 30, 2008, 12:31:11 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Dan Bernstein.

https://bugs.webkit.org/show_bug.cgi?id=22530
Assertion failures seen on buildbot due to uninitialized WorkerThread::m_threadID

  • dom/WorkerThread.cpp: (WebCore::WorkerThread::start): Protect worker startup with a mutex to ensure that this function runs to completion before the thread begins execution. (WebCore::WorkerThread::workerThread): Updated comments. (WebCore::WorkerThread::stop): Ditto.
  • dom/WorkerThread.h: Renamed m_workerContextMutex to m_threadCreationMutex, because it now protects startup as a whole.
  • storage/DatabaseThread.cpp:
  • storage/DatabaseThread.h:
  • storage/LocalStorageThread.cpp:
  • storage/LocalStorageThread.h: Fixed the same m_threadID problem.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/storage/DatabaseThread.cpp

    r35419 r38850  
    4949bool DatabaseThread::start()
    5050{
     51    MutexLocker lock(m_threadCreationMutex);
     52
    5153    if (m_threadID)
    5254        return true;
     
    7678void* DatabaseThread::databaseThread()
    7779{
    78     LOG(StorageAPI, "Starting DatabaseThread %p", this);
     80    {
     81        // Wait for DatabaseThread::start() to complete.
     82        MutexLocker lock(m_threadCreationMutex);
     83        LOG(StorageAPI, "Started DatabaseThread %p", this);
     84    }
    7985
    8086    AutodrainedPool pool;
Note: See TracChangeset for help on using the changeset viewer.