Changeset 116562 in webkit


Ignore:
Timestamp:
May 9, 2012 3:09:10 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

IndexedDB: call abort handler when there are problems committing
https://bugs.webkit.org/show_bug.cgi?id=85841

Patch by Alec Flett <alecflett@chromium.org> on 2012-05-09
Reviewed by Ojan Vafai.

No new tests. Every existing test that calls commit() is testing
the success side of this, and this only throws when there are
LevelDB errors, which is exactly what we're trying to diagnose
with this patch.

  • Modules/indexeddb/IDBBackingStore.h:

(Transaction):

  • Modules/indexeddb/IDBLevelDBBackingStore.cpp:

(WebCore::IDBLevelDBBackingStore::deleteDatabase):
(WebCore::IDBLevelDBBackingStore::Transaction::commit):

  • Modules/indexeddb/IDBLevelDBBackingStore.h:

(Transaction):

  • Modules/indexeddb/IDBTransactionBackendImpl.cpp:

(WebCore::IDBTransactionBackendImpl::commit):

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r116561 r116562  
     12012-05-09  Alec Flett  <alecflett@chromium.org>
     2
     3        IndexedDB: call abort handler when there are problems committing
     4        https://bugs.webkit.org/show_bug.cgi?id=85841
     5
     6        Reviewed by Ojan Vafai.
     7
     8        No new tests. Every existing test that calls commit() is testing
     9        the success side of this, and this only throws when there are
     10        LevelDB errors, which is exactly what we're trying to diagnose
     11        with this patch.
     12
     13        * Modules/indexeddb/IDBBackingStore.h:
     14        (Transaction):
     15        * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
     16        (WebCore::IDBLevelDBBackingStore::deleteDatabase):
     17        (WebCore::IDBLevelDBBackingStore::Transaction::commit):
     18        * Modules/indexeddb/IDBLevelDBBackingStore.h:
     19        (Transaction):
     20        * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
     21        (WebCore::IDBTransactionBackendImpl::commit):
     22
    1232012-05-09  Mark Pilgrim  <pilgrim@chromium.org>
    224
  • trunk/Source/WebCore/Modules/indexeddb/IDBBackingStore.h

    r115997 r116562  
    114114        virtual ~Transaction() { }
    115115        virtual void begin() = 0;
    116         virtual void commit() = 0;
     116        virtual bool commit() = 0;
    117117        virtual void rollback() = 0;
    118118    };
  • trunk/Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp

    r116170 r116562  
    310310    m_currentTransaction->remove(key);
    311311
    312     transaction->commit();
    313     return true;
     312    return transaction->commit();
    314313}
    315314
     
    15761575}
    15771576
    1578 void IDBLevelDBBackingStore::Transaction::commit()
     1577bool IDBLevelDBBackingStore::Transaction::commit()
    15791578{
    15801579    ASSERT(m_backingStore->m_currentTransaction);
    1581     m_backingStore->m_currentTransaction->commit();
     1580    bool result = m_backingStore->m_currentTransaction->commit();
    15821581    m_backingStore->m_currentTransaction.clear();
     1582    return result;
    15831583}
    15841584
  • trunk/Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.h

    r115997 r116562  
    9494        static PassRefPtr<Transaction> create(IDBLevelDBBackingStore*);
    9595        virtual void begin();
    96         virtual void commit();
     96        virtual bool commit();
    9797        virtual void rollback();
    9898
  • trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp

    r109493 r116562  
    198198    m_state = Finished;
    199199    closeOpenCursors();
    200     m_transaction->commit();
    201     m_callbacks->onComplete();
     200    if (m_transaction->commit())
     201        m_callbacks->onComplete();
     202    else
     203        m_callbacks->onAbort();
    202204    m_database->transactionCoordinator()->didFinishTransaction(this);
    203205    m_database->transactionFinished(this);
Note: See TracChangeset for help on using the changeset viewer.