mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 12:20:00 +01:00
LibWeb/IDB: Add store to the current transaction when created
This commit is contained in:
parent
47d6b568fd
commit
edf64b801c
|
|
@ -24,6 +24,7 @@ IDBObjectStore::IDBObjectStore(JS::Realm& realm, GC::Ref<ObjectStore> store, GC:
|
|||
, m_transaction(transaction)
|
||||
, m_name(store->name())
|
||||
{
|
||||
transaction->add_to_scope(store);
|
||||
}
|
||||
|
||||
GC::Ref<IDBObjectStore> IDBObjectStore::create(JS::Realm& realm, GC::Ref<ObjectStore> store, GC::Ref<IDBTransaction> transaction)
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ public:
|
|||
[[nodiscard]] bool is_finished() const { return m_state == TransactionState::Finished; }
|
||||
|
||||
GC::Ptr<ObjectStore> object_store_named(String const& name) const;
|
||||
void add_to_scope(GC::Ref<ObjectStore> object_store) { m_scope.append(object_store); }
|
||||
|
||||
WebIDL::ExceptionOr<void> abort();
|
||||
WebIDL::ExceptionOr<void> commit();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user