mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 03:56:16 +00:00
LibJS+LibWeb: Explicitly mark ignored members in visit_edges methods
This commit is contained in:
parent
39d8c8d2a9
commit
a9d192e882
Notes:
sideshowbarker
2024-07-17 07:25:39 +09:00
Author: https://github.com/mattco98
Commit: a9d192e882
Pull-request: https://github.com/SerenityOS/serenity/pull/17979
Reviewed-by: https://github.com/awesomekling
4 changed files with 13 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue