1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

LibJS: Add Visitor::visit(GCPtr<T>) and Visitor::visit(NonnullGCPtr<T>)

Let's avoid reaching for ptr() as much as possible.
This commit is contained in:
Linus Groh 2022-10-02 11:40:34 +01:00
parent d3b7c06712
commit 0585029c30
2 changed files with 13 additions and 1 deletions

View file

@ -82,7 +82,7 @@ ThrowCompletionOr<void> FinalizationRegistry::cleanup(Optional<JobCallback> call
void FinalizationRegistry::visit_edges(Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
visitor.visit(m_realm.ptr());
visitor.visit(m_realm);
for (auto& record : m_records) {
visitor.visit(record.held_value);
visitor.visit(record.unregister_token);