Truly independent web browser
LibWeb: Root the stores and transactions IDBDatabase collects
Shannon Booth5cf464636d1b
diff --git a/Libraries/LibWeb/IndexedDB/IDBDatabase.cpp b/Libraries/LibWeb/IndexedDB/IDBDatabase.cppindex d7976608fd8..7184eaa09f1 100644--- a/Libraries/LibWeb/IndexedDB/IDBDatabase.cpp+++ b/Libraries/LibWeb/IndexedDB/IDBDatabase.cpp@@ -266,7 +266,7 @@ WebIDL::ExceptionOr<GC::Ref<IDBTransaction>> IDBDatabase::transaction(Variant<Utreturn WebIDL::SimpleException { WebIDL::SimpleExceptionType::TypeError, "Invalid transaction mode"_utf16 };// 7. Let transaction be a newly created transaction with this connection, mode, options’ durability member, and the set of object stores named in scope.- Vector<GC::Ref<ObjectStore>> scope_stores;+ GC::RootVector<GC::Ref<ObjectStore>> scope_stores;for (auto const& store_name : scope) {auto store = database->object_store_with_name(store_name);scope_stores.append(*store);@@ -339,7 +339,7 @@ void IDBDatabase::block_on_conflicting_transactions(JS::Realm& realm, GC::Ref<ID// - A read-only transactions tx can start when there are no read/write transactions which:// - A read/write transaction tx can start when there are no transactions which:- Vector<GC::Ref<IDBTransaction>> blocking;+ GC::RootVector<GC::Ref<IDBTransaction>> blocking;for (auto const& other : m_transactions) {// - Were created before tx; andif (other.ptr() == transaction.ptr())