Changeset 195541 in webkit


Ignore:
Timestamp:
Jan 25, 2016 10:20:23 AM (8 years ago)
Author:
beidson@apple.com
Message:

Modern IDB: Implement getIndexRecord in the SQLite backing store.
https://bugs.webkit.org/show_bug.cgi?id=153425

Reviewed by Darin Adler.

Source/WebCore:

No new tests (Some failures now pass, other failures progressed closer to passing).

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):

LayoutTests:

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

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r195540 r195541  
     12016-01-25  Brady Eidson  <beidson@apple.com>
     2
     3        Modern IDB: Implement getIndexRecord in the SQLite backing store.
     4        https://bugs.webkit.org/show_bug.cgi?id=153425
     5
     6        Reviewed by Darin Adler.
     7
     8        * platform/mac-wk1/TestExpectations:
     9
    1102016-01-25  Eric Carlson  <eric.carlson@apple.com>
    211
  • trunk/LayoutTests/platform/mac-wk1/TestExpectations

    r195527 r195541  
    253253imported/w3c/indexeddb/close-in-upgradeneeded.html [ Failure ]
    254254imported/w3c/indexeddb/cursor-overloads.htm [ Failure ]
     255imported/w3c/indexeddb/idbcursor-advance-continue-async.htm [ Failure ]
     256imported/w3c/indexeddb/idbcursor-advance-invalid.htm [ Failure ]
     257imported/w3c/indexeddb/idbcursor-advance.htm [ Failure ]
     258imported/w3c/indexeddb/idbcursor-continue.htm [ Failure ]
    255259imported/w3c/indexeddb/idbcursor-direction-index-keyrange.htm [ Failure ]
    256260imported/w3c/indexeddb/idbcursor-direction-index.htm [ Failure ]
     
    261265imported/w3c/indexeddb/idbcursor-primarykey.htm [ Failure ]
    262266imported/w3c/indexeddb/idbcursor-reused.htm [ Failure ]
     267imported/w3c/indexeddb/idbcursor-source.htm [ Failure ]
    263268imported/w3c/indexeddb/idbcursor_advance_index.htm [ Failure ]
    264269imported/w3c/indexeddb/idbcursor_advance_index2.htm [ Failure ]
     
    348353imported/w3c/indexeddb/idbfactory_open6.htm [ Failure ]
    349354imported/w3c/indexeddb/idbfactory_open7.htm [ Failure ]
     355imported/w3c/indexeddb/idbindex-multientry-big.htm [ Failure ]
    350356imported/w3c/indexeddb/idbindex-multientry.htm [ Failure ]
    351357imported/w3c/indexeddb/idbindex_count.htm [ Failure ]
     
    427433imported/w3c/indexeddb/keygenerator-overflow.htm [ Failure ]
    428434imported/w3c/indexeddb/keygenerator.htm [ Failure ]
     435imported/w3c/indexeddb/keypath.htm [ Failure ]
    429436imported/w3c/indexeddb/keypath_maxsize.htm [ Failure ]
    430437imported/w3c/indexeddb/list_ordering.htm [ Failure ]
     
    440447imported/w3c/indexeddb/value_recursive.htm [ Failure ]
    441448imported/w3c/indexeddb/writer-starvation.htm [ Failure ]
     449storage/indexeddb/closed-cursor.html [ Failure ]
    442450storage/indexeddb/cursor-added-bug.html [ Failure ]
    443451storage/indexeddb/cursor-advance.html [ Failure ]
     
    535543storage/indexeddb/prefetch-bugfix-108071.html [ Failure ]
    536544storage/indexeddb/readonly.html [ Failure ]
    537 storage/indexeddb/transaction-active-flag.html [ Failure ]
    538545storage/indexeddb/transaction-rollback.html [ Failure ]
    539546storage/indexeddb/value-undefined.html [ Failure ]
     
    542549# SQLite backend tests that timeout
    543550crypto/subtle/rsa-indexeddb.html [ Skip ]
    544 imported/w3c/indexeddb/idbcursor-advance-continue-async.htm [ Skip ]
    545 imported/w3c/indexeddb/idbcursor-advance-invalid.htm [ Skip ]
    546 imported/w3c/indexeddb/idbcursor-advance.htm [ Skip ]
    547 imported/w3c/indexeddb/idbcursor-continue.htm [ Skip ]
    548 imported/w3c/indexeddb/idbcursor-source.htm [ Skip ]
    549551imported/w3c/indexeddb/idbfactory_open12.htm [ Skip ]
    550 imported/w3c/indexeddb/idbindex-multientry-big.htm [ Skip ]
    551552imported/w3c/indexeddb/idbobjectstore_openCursor_invalid.htm [ Skip ]
    552 imported/w3c/indexeddb/keypath.htm [ Skip ]
    553 storage/indexeddb/closed-cursor.html [ Skip ]
    554553storage/indexeddb/cursor-cast.html [ Skip ]
    555 storage/indexeddb/deletedatabase-transaction.html [ Skip ]
    556 storage/indexeddb/modern/blocked-open-db-requests.html [ Skip ]
    557554storage/indexeddb/modern/transaction-scheduler-1.html [ Skip ]
    558555storage/indexeddb/modern/transaction-scheduler-2.html [ Skip ]
    559 storage/indexeddb/modern/transaction-scheduler-4.html [ Skip ]
    560556storage/indexeddb/modern/transaction-scheduler-5.html [ Skip ]
    561557storage/indexeddb/modern/transaction-scheduler-6.html [ Skip ]
    562 storage/indexeddb/noblobs.html [ Skip ]
    563558storage/indexeddb/pending-activity.html [ Skip ]
    564559storage/indexeddb/prefetch-invalidation.html [ Skip ]
    565560storage/indexeddb/prefetch-race.html [ Skip ]
    566 storage/indexeddb/primary-key-unique-to-objectstore.html [ Skip ]
    567561storage/indexeddb/request-result-cache.html [ Skip ]
    568562storage/indexeddb/transaction-coordination-within-database.html [ Skip ]
    569 storage/indexeddb/transaction-ordering.html [ Skip ]
    570563
    571564# SQLite backend tests that crash or ASSERT
  • trunk/Source/WebCore/ChangeLog

    r195540 r195541  
     12016-01-25  Brady Eidson  <beidson@apple.com>
     2
     3        Modern IDB: Implement getIndexRecord in the SQLite backing store.
     4        https://bugs.webkit.org/show_bug.cgi?id=153425
     5
     6        Reviewed by Darin Adler.
     7
     8        No new tests (Some failures now pass, other failures progressed closer to passing).
     9
     10        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
     11        (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
     12
    1132016-01-25  Eric Carlson  <eric.carlson@apple.com>
    214
  • trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp

    r195527 r195541  
    11271127}
    11281128
    1129 IDBError SQLiteIDBBackingStore::getIndexRecord(const IDBResourceIdentifier&, uint64_t, uint64_t, IndexedDB::IndexRecordType, const IDBKeyRangeData&, IDBGetResult&)
    1130 {
    1131     return { IDBDatabaseException::UnknownError, ASCIILiteral("Not implemented") };
     1129IDBError SQLiteIDBBackingStore::getIndexRecord(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreID, uint64_t indexID, IndexedDB::IndexRecordType type, const IDBKeyRangeData& range, IDBGetResult& getResult)
     1130{
     1131    LOG(IndexedDB, "SQLiteIDBBackingStore::getIndexRecord");
     1132    ASSERT(m_sqliteDB);
     1133    ASSERT(m_sqliteDB->isOpen());
     1134
     1135    auto* transaction = m_transactions.get(transactionIdentifier);
     1136    if (!transaction || !transaction->inProgress()) {
     1137        LOG_ERROR("Attempt to get an index record from database without an in-progress transaction");
     1138        return { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to get an index record from database without an in-progress transaction") };
     1139    }
     1140
     1141    auto cursor = transaction->maybeOpenBackingStoreCursor(objectStoreID, indexID, range);
     1142    if (!cursor) {
     1143        LOG_ERROR("Cannot open cursor to perform index get in database");
     1144        return { IDBDatabaseException::UnknownError, ASCIILiteral("Cannot open cursor to perform index get in database") };
     1145    }
     1146
     1147    if (type == IndexedDB::IndexRecordType::Key)
     1148        getResult = { cursor->currentPrimaryKey() };
     1149    else {
     1150        getResult = { SharedBuffer::create(cursor->currentValueBuffer().data(), cursor->currentValueBuffer().size()) };
     1151        getResult.setKeyData(cursor->currentPrimaryKey());
     1152    }
     1153
     1154    return { };
    11321155}
    11331156
Note: See TracChangeset for help on using the changeset viewer.