mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
Revert "LibJS: Remove "uprooting" mechanism from garbage collector"
This reverts commit 6232ad3a0d
.
Unfortunately this introduced some flakiness on CI, so it wasn't
quite this simple.
This commit is contained in:
parent
a2955501d3
commit
1768d70823
6 changed files with 65 additions and 28 deletions
|
@ -276,6 +276,11 @@ void Heap::mark_live_cells(HashTable<Cell*> const& roots)
|
|||
bytecode_interpreter->visit_edges(visitor);
|
||||
|
||||
visitor.mark_all_live_cells();
|
||||
|
||||
for (auto& inverse_root : m_uprooted_cells)
|
||||
inverse_root->set_marked(false);
|
||||
|
||||
m_uprooted_cells.clear();
|
||||
}
|
||||
|
||||
bool Heap::cell_must_survive_garbage_collection(Cell const& cell)
|
||||
|
@ -422,6 +427,11 @@ void Heap::undefer_gc(Badge<DeferGC>)
|
|||
}
|
||||
}
|
||||
|
||||
void Heap::uproot_cell(Cell* cell)
|
||||
{
|
||||
m_uprooted_cells.append(cell);
|
||||
}
|
||||
|
||||
void register_safe_function_closure(void* base, size_t size)
|
||||
{
|
||||
if (!s_custom_ranges_for_conservative_scan) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue