LibWeb/HTML: Store NonnullGCPtr in browsing context group set

These are never supposed to be null.
This commit is contained in:
Linus Groh 2023-04-20 16:45:28 +01:00
commit b4f78760f2
Notes: sideshowbarker 2024-07-17 03:18:29 +09:00

View file

@ -11,21 +11,21 @@
namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/browsers.html#browsing-context-group-set
static HashTable<BrowsingContextGroup*>& user_agent_browsing_context_group_set()
static HashTable<JS::NonnullGCPtr<BrowsingContextGroup>>& user_agent_browsing_context_group_set()
{
static HashTable<BrowsingContextGroup*> set;
static HashTable<JS::NonnullGCPtr<BrowsingContextGroup>> set;
return set;
}
BrowsingContextGroup::BrowsingContextGroup(Web::Page& page)
: m_page(page)
{
user_agent_browsing_context_group_set().set(this);
user_agent_browsing_context_group_set().set(*this);
}
BrowsingContextGroup::~BrowsingContextGroup()
{
user_agent_browsing_context_group_set().remove(this);
user_agent_browsing_context_group_set().remove(*this);
}
void BrowsingContextGroup::visit_edges(Cell::Visitor& visitor)