IndexedDB: Handle missing object stores in object store operations (#38115)

These changes fix a large number of panics that can manifest as
intermittent test failures. They also add more specification text to
various IDBObjectStore methods and implement missing steps that check
for whether an object store is deleted.

Testing: Existing test coverage.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-08-22 18:04:34 -04:00 committed by GitHub
parent f334a56b07
commit b7cdd88b8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 96 additions and 92 deletions

View file

@ -5,28 +5,16 @@
expected: ERROR
[idbobjectstore-add-put-exception-order.any.html]
[IDBObjectStore.put exception order: InvalidStateError vs. TransactionInactiveError]
expected: FAIL
[IDBObjectStore.put exception order: TransactionInactiveError vs. ReadOnlyError]
expected: FAIL
[IDBObjectStore.add exception order: InvalidStateError vs. TransactionInactiveError]
expected: FAIL
[IDBObjectStore.add exception order: TransactionInactiveError vs. ReadOnlyError]
expected: FAIL
[idbobjectstore-add-put-exception-order.any.worker.html]
[IDBObjectStore.put exception order: InvalidStateError vs. TransactionInactiveError]
expected: FAIL
[IDBObjectStore.put exception order: TransactionInactiveError vs. ReadOnlyError]
expected: FAIL
[IDBObjectStore.add exception order: InvalidStateError vs. TransactionInactiveError]
expected: FAIL
[IDBObjectStore.add exception order: TransactionInactiveError vs. ReadOnlyError]
expected: FAIL

View file

@ -1,7 +1,4 @@
[idbobjectstore-clear-exception-order.any.worker.html]
[IDBObjectStore.clear exception order: InvalidStateError vs. TransactionInactiveError]
expected: FAIL
[IDBObjectStore.clear exception order: TransactionInactiveError vs. ReadOnlyError]
expected: FAIL
@ -10,9 +7,6 @@
expected: ERROR
[idbobjectstore-clear-exception-order.any.html]
[IDBObjectStore.clear exception order: InvalidStateError vs. TransactionInactiveError]
expected: FAIL
[IDBObjectStore.clear exception order: TransactionInactiveError vs. ReadOnlyError]
expected: FAIL

View file

@ -2,9 +2,6 @@
expected: ERROR
[idbobjectstore-delete-exception-order.any.html]
[IDBObjectStore.delete exception order: InvalidStateError vs. TransactionInactiveError]
expected: FAIL
[IDBObjectStore.delete exception order: TransactionInactiveError vs. ReadOnlyError]
expected: FAIL
@ -13,8 +10,5 @@
expected: ERROR
[idbobjectstore-delete-exception-order.any.worker.html]
[IDBObjectStore.delete exception order: InvalidStateError vs. TransactionInactiveError]
expected: FAIL
[IDBObjectStore.delete exception order: TransactionInactiveError vs. ReadOnlyError]
expected: FAIL

View file

@ -1,7 +1,4 @@
[idbobjectstore-query-exception-order.any.html]
[IDBObjectStore.get exception order: InvalidStateError vs. TransactionInactiveError]
expected: FAIL
[IDBObjectStore.get exception order: TransactionInactiveError vs. DataError]
expected: FAIL
@ -17,9 +14,6 @@
[IDBObjectStore.getAllKeys exception order: TransactionInactiveError vs. DataError]
expected: FAIL
[IDBObjectStore.count exception order: InvalidStateError vs. TransactionInactiveError]
expected: FAIL
[IDBObjectStore.count exception order: TransactionInactiveError vs. DataError]
expected: FAIL
@ -40,9 +34,6 @@
expected: ERROR
[idbobjectstore-query-exception-order.any.worker.html]
[IDBObjectStore.get exception order: InvalidStateError vs. TransactionInactiveError]
expected: FAIL
[IDBObjectStore.get exception order: TransactionInactiveError vs. DataError]
expected: FAIL
@ -58,9 +49,6 @@
[IDBObjectStore.getAllKeys exception order: TransactionInactiveError vs. DataError]
expected: FAIL
[IDBObjectStore.count exception order: InvalidStateError vs. TransactionInactiveError]
expected: FAIL
[IDBObjectStore.count exception order: TransactionInactiveError vs. DataError]
expected: FAIL

View file

@ -5,9 +5,6 @@
[Clear removes all records from an index ]
expected: FAIL
[If the object store has been deleted, the implementation must throw a DOMException of type InvalidStateError ]
expected: FAIL
[idbobjectstore_clear.any.sharedworker.html]
expected: ERROR
@ -21,6 +18,3 @@
[Clear removes all records from an index ]
expected: FAIL
[If the object store has been deleted, the implementation must throw a DOMException of type InvalidStateError ]
expected: FAIL

View file

@ -5,9 +5,6 @@
[Returns the number of records that have keys with the key]
expected: FAIL
[If the object store has been deleted, the implementation must throw a DOMException of type InvalidStateError ]
expected: FAIL
[idbobjectstore_count.any.sharedworker.html]
expected: ERROR
@ -19,9 +16,6 @@
[Returns the number of records that have keys with the key]
expected: FAIL
[If the object store has been deleted, the implementation must throw a DOMException of type InvalidStateError ]
expected: FAIL
[idbobjectstore_count.any.serviceworker.html]
expected: ERROR

View file

@ -12,9 +12,6 @@
[delete() removes all of the records in the range]
expected: FAIL
[If the object store has been deleted, the implementation must throw a DOMException of type InvalidStateError]
expected: FAIL
[idbobjectstore_delete.any.serviceworker.html]
expected: ERROR
@ -33,9 +30,6 @@
[delete() removes all of the records in the range]
expected: FAIL
[If the object store has been deleted, the implementation must throw a DOMException of type InvalidStateError]
expected: FAIL
[idbobjectstore_delete.any.sharedworker.html]
expected: ERROR

View file

@ -2,7 +2,6 @@
expected: ERROR
[nested-cloning-basic.any.worker.html]
expected: CRASH
[small typed array]
expected: FAIL