Changeset 192748 in webkit


Ignore:
Timestamp:
Nov 23, 2015, 11:41:05 AM (10 years ago)
Author:
beidson@apple.com
Message:

Modern IDB: Unskip storage/indexeddb/mozilla/global-data.html.
https://bugs.webkit.org/show_bug.cgi?id=151557

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Unskipping existing test storage/indexeddb/mozilla/global-data.html).

  • Reworking some invalid ASSERTS
  • Actually opening pending open-database-requests after a version change transaction completes
  • Allow starting new transactions when the version change transaction has *started* finishing, but before it finishes finishing.
  • Modules/indexeddb/client/IDBDatabaseImpl.cpp:

(WebCore::IDBClient::IDBDatabase::transaction):

  • Modules/indexeddb/client/IDBTransactionImpl.h:
  • Modules/indexeddb/server/MemoryObjectStore.cpp:

(WebCore::IDBServer::MemoryObjectStore::~MemoryObjectStore):

  • Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:

(WebCore::IDBServer::MemoryObjectStoreCursor::keyAdded): Deleted.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):

  • Modules/indexeddb/server/UniqueIDBDatabase.h:

LayoutTests:

  • platform/mac-wk1/TestExpectations:
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r192741 r192748  
     12015-11-23  Brady Eidson  <beidson@apple.com>
     2
     3        Modern IDB: Unskip storage/indexeddb/mozilla/global-data.html.
     4        https://bugs.webkit.org/show_bug.cgi?id=151557
     5
     6        Reviewed by Alex Christensen.
     7
     8        * platform/mac-wk1/TestExpectations:
     9
    1102015-11-17  Sergio Villar Senin  <svillar@igalia.com>
    211
  • trunk/LayoutTests/platform/mac-wk1/TestExpectations

    r192713 r192748  
    7373# But Modern IndexedDB is.
    7474storage/indexeddb/modern [ Pass ]
     75storage/indexeddb/mozilla/global-data.html [ Pass ]
    7576
    7677# Fails with WebKit1 only.
  • trunk/Source/WebCore/ChangeLog

    r192746 r192748  
     12015-11-23  Brady Eidson  <beidson@apple.com>
     2
     3        Modern IDB: Unskip storage/indexeddb/mozilla/global-data.html.
     4        https://bugs.webkit.org/show_bug.cgi?id=151557
     5
     6        Reviewed by Alex Christensen.
     7
     8        No new tests (Unskipping existing test storage/indexeddb/mozilla/global-data.html).
     9
     10        - Reworking some invalid ASSERTS
     11        - Actually opening pending open-database-requests after a version change transaction completes
     12        - Allow starting new transactions when the version change transaction has *started* finishing,
     13          but before it finishes finishing.
     14
     15        * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
     16        (WebCore::IDBClient::IDBDatabase::transaction):
     17       
     18        * Modules/indexeddb/client/IDBTransactionImpl.h:
     19       
     20        * Modules/indexeddb/server/MemoryObjectStore.cpp:
     21        (WebCore::IDBServer::MemoryObjectStore::~MemoryObjectStore):
     22       
     23        * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
     24        (WebCore::IDBServer::MemoryObjectStoreCursor::keyAdded): Deleted.
     25       
     26        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
     27        (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
     28        (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
     29        (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
     30        * Modules/indexeddb/server/UniqueIDBDatabase.h:
     31
    1322015-11-23  Youenn Fablet  <youenn.fablet@crf.canon.fr>
    233
  • trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp

    r192720 r192748  
    157157    }
    158158
    159     if (m_versionChangeTransaction) {
     159    if (m_versionChangeTransaction && !m_versionChangeTransaction->isFinishedOrFinishing()) {
    160160        ec = INVALID_STATE_ERR;
    161161        return nullptr;
  • trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h

    r192720 r192748  
    124124    void operationDidComplete(TransactionOperation&);
    125125
     126    bool isFinishedOrFinishing() const;
     127
    126128private:
    127129    IDBTransaction(IDBDatabase&, const IDBTransactionInfo&, IDBOpenDBRequest*);
    128 
    129     bool isFinishedOrFinishing() const;
    130130
    131131    void commit();
  • trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp

    r192694 r192748  
    5656MemoryObjectStore::~MemoryObjectStore()
    5757{
    58     ASSERT(!m_writeTransaction);
     58    m_writeTransaction = nullptr;
    5959}
    6060
  • trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStoreCursor.cpp

    r192694 r192748  
    6363void MemoryObjectStoreCursor::keyAdded(std::set<IDBKeyData>::iterator iterator)
    6464{
    65     ASSERT(m_currentPositionKey.isValid());
    66 
    6765    if (hasIterators())
    6866        return;
  • trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp

    r192687 r192748  
    4646    , m_identifier(identifier)
    4747    , m_deleteOrRunTransactionsTimer(*this, &UniqueIDBDatabase::deleteOrRunTransactionsTimerFired)
     48    , m_handleOpenDatabaseOperationsTimer(*this, &UniqueIDBDatabase::handleOpenDatabaseOperations)
    4849{
    4950}
     
    114115    // We will try again later.
    115116    if (m_versionChangeDatabaseConnection)
     117        return;
     118
     119    if (m_pendingOpenDatabaseOperations.isEmpty())
    116120        return;
    117121
     
    714718        m_versionChangeTransaction = nullptr;
    715719        m_versionChangeDatabaseConnection = nullptr;
     720
     721        if (!m_handleOpenDatabaseOperationsTimer.isActive())
     722            m_handleOpenDatabaseOperationsTimer.startOneShot(0);
    716723    }
    717724
  • trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h

    r192687 r192748  
    187187
    188188    Timer m_deleteOrRunTransactionsTimer;
     189    Timer m_handleOpenDatabaseOperationsTimer;
    189190
    190191    Deque<RefPtr<UniqueIDBDatabaseTransaction>> m_pendingTransactions;
Note: See TracChangeset for help on using the changeset viewer.