LibWeb: Change Storage{Bottle,Bucket,Shelf} to be GC-allocated

In upcoming changes StorageBottle will own pointers to GC-allocated
objects, so it needs to be a GC-allocated object itself to avoid
introducing more GC roots.
This commit is contained in:
Aliaksandr Kalenik 2025-06-11 18:51:22 +02:00 committed by Alexander Kalenik
parent 70a29f36c6
commit f53559cb55
Notes: github-actions[bot] 2025-06-12 15:06:02 +00:00
12 changed files with 117 additions and 44 deletions

View file

@ -50,6 +50,7 @@ static RefPtr<Gfx::SkiaBackendContext> get_skia_backend_context()
TraversableNavigable::TraversableNavigable(GC::Ref<Page> page)
: Navigable(page)
, m_storage_shed(StorageAPI::StorageShed::create(page->heap()))
, m_session_history_traversal_queue(vm().heap().allocate<SessionHistoryTraversalQueue>())
{
if (!page->client().is_svg_page_client()) {
@ -75,6 +76,7 @@ void TraversableNavigable::visit_edges(Cell::Visitor& visitor)
Base::visit_edges(visitor);
visitor.visit(m_session_history_entries);
visitor.visit(m_session_history_traversal_queue);
visitor.visit(m_storage_shed);
}
static OrderedHashTable<TraversableNavigable*>& user_agent_top_level_traversable_set()