diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContextGroup.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContextGroup.cpp
index 3987370b75..046b92478b 100644
--- a/Userland/Libraries/LibWeb/HTML/BrowsingContextGroup.cpp
+++ b/Userland/Libraries/LibWeb/HTML/BrowsingContextGroup.cpp
@@ -34,6 +34,7 @@ BrowsingContextGroup::~BrowsingContextGroup()
void BrowsingContextGroup::visit_edges(Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
+ visitor.visit(m_page);
for (auto& context : m_browsing_context_set)
visitor.visit(context);
}
diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContextGroup.h b/Userland/Libraries/LibWeb/HTML/BrowsingContextGroup.h
index 0922be999a..a5f4932a7f 100644
--- a/Userland/Libraries/LibWeb/HTML/BrowsingContextGroup.h
+++ b/Userland/Libraries/LibWeb/HTML/BrowsingContextGroup.h
@@ -43,7 +43,7 @@ private:
// https://html.spec.whatwg.org/multipage/browsers.html#browsing-context-group-set
OrderedHashTable> m_browsing_context_set;
- WeakPtr m_page;
+ JS::NonnullGCPtr m_page;
};
}