LibJS: Fix some GCVerifier warnings

This commit is contained in:
Matthew Olsson 2024-04-05 13:47:41 -07:00 committed by Andreas Kling
commit 8b8ada292e
Notes: sideshowbarker 2024-07-16 23:57:20 +09:00
4 changed files with 15 additions and 15 deletions

View file

@ -183,7 +183,7 @@ struct ExecutionContextRootsCollector : public Cell::Visitor {
VERIFY_NOT_REACHED();
}
HashTable<Cell*> roots;
HashTable<GCPtr<Cell>> roots;
};
void VM::gather_roots(HashMap<Cell*, HeapRoot>& roots)
@ -207,7 +207,7 @@ void VM::gather_roots(HashMap<Cell*, HeapRoot>& roots)
for (auto const& execution_context : stack) {
ExecutionContextRootsCollector visitor;
execution_context->visit_edges(visitor);
for (auto* cell : visitor.roots)
for (auto cell : visitor.roots)
roots.set(cell, HeapRoot { .type = HeapRoot::Type::VM });
}
};