Enable access to transaction from idbobjectstore (#38737)

Adds the transaction property to IDBObjectStore, as per spec.

Testing: WPT
Fixes: None

---------

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
This commit is contained in:
Ashwin Naren 2025-08-20 19:26:40 -07:00 committed by GitHub
parent b869b7eb96
commit dd7b2a5ee2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 15 deletions

View file

@ -449,9 +449,9 @@ impl IDBObjectStoreMethods<crate::DomTypeHolder> for IDBObjectStore {
// } // }
// https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-transaction // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-transaction
// fn Transaction(&self) -> DomRoot<IDBTransaction> { fn GetTransaction(&self) -> Option<DomRoot<IDBTransaction>> {
// unimplemented!(); self.transaction()
// } }
// https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-autoincrement // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-autoincrement
fn AutoIncrement(&self) -> bool { fn AutoIncrement(&self) -> bool {

View file

@ -13,7 +13,7 @@ interface IDBObjectStore {
attribute DOMString name; attribute DOMString name;
// readonly attribute any keyPath; // readonly attribute any keyPath;
// readonly attribute DOMStringList indexNames; // readonly attribute DOMStringList indexNames;
// [SameObject] readonly attribute IDBTransaction transaction; [SameObject] readonly attribute IDBTransaction? transaction;
readonly attribute boolean autoIncrement; readonly attribute boolean autoIncrement;
[NewObject, Throws] IDBRequest put(any value, optional any key); [NewObject, Throws] IDBRequest put(any value, optional any key);

View file

@ -2,13 +2,8 @@
expected: ERROR expected: ERROR
[idbobjectstore_get.any.html] [idbobjectstore_get.any.html]
[When a transaction is aborted, throw TransactionInactiveError]
expected: FAIL
[idbobjectstore_get.any.serviceworker.html] [idbobjectstore_get.any.serviceworker.html]
expected: ERROR expected: ERROR
[idbobjectstore_get.any.worker.html] [idbobjectstore_get.any.worker.html]
[When a transaction is aborted, throw TransactionInactiveError]
expected: FAIL

View file

@ -11,9 +11,6 @@
[IDBObjectStore interface: attribute indexNames] [IDBObjectStore interface: attribute indexNames]
expected: FAIL expected: FAIL
[IDBObjectStore interface: attribute transaction]
expected: FAIL
[IDBObjectStore interface: operation getAll(optional any, optional unsigned long)] [IDBObjectStore interface: operation getAll(optional any, optional unsigned long)]
expected: FAIL expected: FAIL
@ -178,9 +175,6 @@
[IDBObjectStore interface: attribute indexNames] [IDBObjectStore interface: attribute indexNames]
expected: FAIL expected: FAIL
[IDBObjectStore interface: attribute transaction]
expected: FAIL
[IDBObjectStore interface: operation getAll(optional any, optional unsigned long)] [IDBObjectStore interface: operation getAll(optional any, optional unsigned long)]
expected: FAIL expected: FAIL