mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
LibJS: Remove the JS_TRACK_ZOMBIE_CELLS option
This feature had bitrotted somewhat and would trigger errors because PrimitiveStrings were "destroyed" but because of this mode they were not removed from the string cache. Even fixing that case running test-js with the options still failed in more places.
This commit is contained in:
parent
794d79e315
commit
8da6c01d8f
13 changed files with 1 additions and 107 deletions
|
@ -190,14 +190,6 @@ public:
|
|||
return;
|
||||
dbgln_if(HEAP_DEBUG, " ! {}", &cell);
|
||||
|
||||
#ifdef JS_TRACK_ZOMBIE_CELLS
|
||||
if (cell.state() == Cell::State::Zombie) {
|
||||
dbgln("BUG! Marking a zombie cell, {} @ {:p}", cell.class_name(), &cell);
|
||||
cell.vm().dump_backtrace();
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
#endif
|
||||
|
||||
cell.set_marked(true);
|
||||
cell.visit_edges(*this);
|
||||
}
|
||||
|
@ -234,16 +226,7 @@ void Heap::sweep_dead_cells(bool print_report, const Core::ElapsedTimer& measure
|
|||
block.template for_each_cell_in_state<Cell::State::Live>([&](Cell* cell) {
|
||||
if (!cell->is_marked()) {
|
||||
dbgln_if(HEAP_DEBUG, " ~ {}", cell);
|
||||
#ifdef JS_TRACK_ZOMBIE_CELLS
|
||||
if (m_zombify_dead_cells) {
|
||||
cell->set_state(Cell::State::Zombie);
|
||||
cell->did_become_zombie();
|
||||
} else {
|
||||
#endif
|
||||
block.deallocate(cell);
|
||||
#ifdef JS_TRACK_ZOMBIE_CELLS
|
||||
}
|
||||
#endif
|
||||
block.deallocate(cell);
|
||||
++collected_cells;
|
||||
collected_cell_bytes += block.cell_size();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue