LibWeb/IDB: Implement IDBTransaction attributes

This also uncovered a bug, where the transactions type was never set :^)
This commit is contained in:
stelar7 2025-04-01 19:51:22 +02:00 committed by Andrew Kaster
commit 5298ecfc94
Notes: github-actions[bot] 2025-04-09 17:50:19 +00:00
7 changed files with 63 additions and 15 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2024, stelar7 <dudedbz@gmail.com>
* Copyright (c) 2024-2025, stelar7 <dudedbz@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -312,9 +312,8 @@ GC::Ref<IDBTransaction> upgrade_a_database(JS::Realm& realm, GC::Ref<IDBDatabase
auto db = connection->associated_database();
// 2. Let transaction be a new upgrade transaction with connection used as connection.
auto transaction = IDBTransaction::create(realm, connection);
// FIXME: 3. Set transactions scope to connections object store set.
// 3. Set transactions scope to connections object store set.
auto transaction = IDBTransaction::create(realm, connection, Bindings::IDBTransactionMode::Versionchange, Bindings::IDBTransactionDurability::Default, Vector<GC::Ref<ObjectStore>> { connection->object_store_set() });
// 4. Set dbs upgrade transaction to transaction.
db->set_upgrade_transaction(transaction);