LibWeb/IDB: Keep track of the connection used to start a transaction

This commit is contained in:
stelar7 2025-04-09 22:59:07 +02:00 committed by Andrew Kaster
commit fc93ec135e
Notes: github-actions[bot] 2025-04-11 01:14:28 +00:00
3 changed files with 8 additions and 0 deletions

View file

@ -24,6 +24,7 @@ IDBTransaction::IDBTransaction(JS::Realm& realm, GC::Ref<IDBDatabase> connection
, m_scope(move(scopes))
{
m_uuid = MUST(Crypto::generate_random_uuid());
connection->add_transaction(*this);
}
GC::Ref<IDBTransaction> IDBTransaction::create(JS::Realm& realm, GC::Ref<IDBDatabase> connection, Bindings::IDBTransactionMode mode, Bindings::IDBTransactionDurability durability = Bindings::IDBTransactionDurability::Default, Vector<GC::Ref<ObjectStore>> scopes = {})