Explorar o código

LibWeb/HTML: Store NonnullGCPtr in browsing context group set

These are never supposed to be null.
Linus Groh %!s(int64=2) %!d(string=hai) anos
pai
achega
b4f78760f2
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      Userland/Libraries/LibWeb/HTML/BrowsingContextGroup.cpp

+ 4 - 4
Userland/Libraries/LibWeb/HTML/BrowsingContextGroup.cpp

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