Changeset 29876 in webkit


Ignore:
Timestamp:
Jan 30, 2008 2:26:09 PM (16 years ago)
Author:
timothy@apple.com
Message:

Reviewed by Darin Adler.

<rdar://problem/5688428> Reproducible assertion failure in SQLTransaction::performNextStep() (16876)

Revised fix to use the globalCallbackMutex() mutex and hold the mutex
for the entire function scope.

  • storage/Database.cpp: (WebCore::Database::performTransactionStep):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r29875 r29876  
     12008-01-30  Timothy Hatcher  <timothy@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        <rdar://problem/5688428> Reproducible assertion failure in SQLTransaction::performNextStep() (16876)
     6
     7        Revised fix to use the globalCallbackMutex() mutex and hold the mutex
     8        for the entire function scope.
     9
     10        * storage/Database.cpp:
     11        (WebCore::Database::performTransactionStep):
     12
    1132008-01-30  Timothy Hatcher  <timothy@apple.com>
    214
  • trunk/WebCore/storage/Database.cpp

    r29872 r29876  
    404404void Database::performTransactionStep()
    405405{
    406     // Do not perform transaction if a callback is scheduled
    407     {
    408         MutexLocker locker(m_callbackMutex);
    409         if (s_globalCallbackScheduled)
    410             return;
    411     }
    412    
     406    // Do not perform a transaction if a global callback is scheduled.
     407    MutexLocker locker(globalCallbackMutex());
     408    if (s_globalCallbackScheduled)
     409        return;
     410
    413411    {
    414412        MutexLocker locker(m_transactionMutex);
    415        
     413
    416414        if (!m_currentTransaction) {
    417415            ASSERT(m_transactionQueue.size());
     
    420418        }
    421419    }
    422    
     420
    423421    // If this step completes the entire transaction, clear the working transaction
    424422    // and schedule the next one if necessary
    425423    if (!m_currentTransaction->performNextStep())
    426424        return;
    427        
     425
    428426    {
    429427        MutexLocker locker(m_transactionMutex);
    430428        m_currentTransaction = 0;
    431        
     429
    432430        if (m_transactionQueue.size())
    433431            m_databaseThread->scheduleTask(this, new DatabaseTransactionTask);
Note: See TracChangeset for help on using the changeset viewer.