[IndexedDB] Adhere better to the specification for idb object store related operations (#37682)

Many object store related operations require the transaction to be
checked: to ensure it is still active, and, if the operation is a write,
that the transaction is not read-only. I've added the
`check_transaction` method to perform these checks.

Additionally `Clear` was still half-implemented, so I went ahead and
implemented that.

---------

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
This commit is contained in:
Ashwin Naren 2025-07-15 19:11:06 -07:00 committed by GitHub
parent 2e3c280f46
commit 71e7019d45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 94 additions and 35 deletions

View file

@ -92,6 +92,8 @@ pub enum AsyncReadWriteOperation {
RemoveItem(
IndexedDBKeyType, // Key
),
/// Clears all key/value pairs in the associated idb data
Clear,
}
/// Operations that are not executed instantly, but rather added to a