LibJS+LibWeb: Add missing GC marking visits

This adds visit_edges(Cell::Visitor&) methods to various helper structs
that contain GC pointers, and makes sure they are called from owning
GC-heap-allocated objects as needed.

These were found by our Clang plugin after expanding its capabilities.
The added rules will be enforced by CI going forward.
This commit is contained in:
Andreas Kling
2026-01-06 00:36:34 +01:00
committed by Andreas Kling
parent 2677338f43
commit a9cc425cde
Notes: github-actions[bot] 2026-01-07 11:50:00 +00:00
41 changed files with 322 additions and 38 deletions

View File

@@ -32,6 +32,12 @@ public:
ReadonlySpan<PropertyKey const> property_keys() const { return m_property_keys; }
void visit_edges(GC::Cell::Visitor& visitor)
{
for (auto& key : m_property_keys)
key.visit_edges(visitor);
}
private:
Vector<PropertyKey> m_property_keys;
};