LibJS: Use correct cell address for HeapFunction captures in GC dumps

We were previously dumping the address of the cell pointer instead of
the address of the cell itself. This was causing mysterious orphans
in GC dumps, and it took me way too long to figure this out.
This commit is contained in:
Andreas Kling 2024-11-11 15:45:51 +01:00 committed by Andreas Kling
parent 7efc89e92b
commit e240084437
Notes: github-actions[bot] 2024-11-11 20:42:11 +00:00

View file

@ -152,7 +152,7 @@ public:
for_each_cell_among_possible_pointers(m_all_live_heap_blocks, possible_pointers, [&](Cell* cell, FlatPtr) {
if (m_node_being_visited)
m_node_being_visited->edges.set(reinterpret_cast<FlatPtr>(&cell));
m_node_being_visited->edges.set(reinterpret_cast<FlatPtr>(cell));
if (m_graph.get(reinterpret_cast<FlatPtr>(&cell)).has_value())
return;