1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:17:35 +00:00

LibJS+LibWeb: Explicitly mark ignored members in visit_edges methods

This commit is contained in:
Matthew Olsson 2023-03-22 17:05:16 -07:00 committed by Andreas Kling
parent 39d8c8d2a9
commit a9d192e882
4 changed files with 13 additions and 0 deletions

View file

@ -80,6 +80,13 @@ public:
visit_impl(value.as_cell());
}
// Allow explicitly ignoring a GC-allocated member in a visit_edges implementation instead
// of just not using it.
template<typename T>
void ignore(T const&)
{
}
protected:
virtual void visit_impl(Cell&) = 0;
virtual ~Visitor() = default;