Skip to content

Truly independent web browser

LibWeb: Root the scroll-state containers to forget

Shannon Booth7a6f5348fd5e
diff --git a/Libraries/LibWeb/CSS/ScrollStateContainerQuery.cpp b/Libraries/LibWeb/CSS/ScrollStateContainerQuery.cpp
index c004851b408..63fd89d45d9 100644
--- a/Libraries/LibWeb/CSS/ScrollStateContainerQuery.cpp
+++ b/Libraries/LibWeb/CSS/ScrollStateContainerQuery.cpp
@@ -173,7 +173,7 @@ bool ScrollStateQueryContainers::snapshot_post_layout_state(Layout::BegunRead co
// Sticky offsets are resolved with the scroll state of the settled visual context tree.
document.update_paint_and_hit_testing_properties_if_needed();
- Vector<GC::Ref<DOM::Element>> containers_to_forget;
+ GC::RootVector<GC::Ref<DOM::Element>> containers_to_forget;
bool any_state_changed = false;
for (auto& [element, container] : m_containers) {
if (which == Snapshot::NewContainersOnly && container.has_been_snapshotted)