1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:57:35 +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:
davidot 2022-02-04 16:12:39 +01:00 committed by Andreas Kling
parent 794d79e315
commit 8da6c01d8f
13 changed files with 1 additions and 107 deletions

View file

@ -35,13 +35,6 @@ public:
private:
virtual void visit_edges(Visitor& visitor) override;
#ifdef JS_TRACK_ZOMBIE_CELLS
virtual void did_become_zombie() override
{
deregister();
}
#endif
FunctionObject* m_cleanup_callback { nullptr };
struct FinalizationRecord {

View file

@ -247,11 +247,4 @@ FLATTEN void Shape::add_property_without_transition(PropertyKey const& property_
add_property_without_transition(property_name.to_string_or_symbol(), attributes);
}
#ifdef JS_TRACK_ZOMBIE_CELLS
void Shape::did_become_zombie()
{
revoke_weak_ptrs();
}
#endif
}

View file

@ -89,10 +89,6 @@ private:
virtual const char* class_name() const override { return "Shape"; }
virtual void visit_edges(Visitor&) override;
#ifdef JS_TRACK_ZOMBIE_CELLS
virtual void did_become_zombie() override;
#endif
Shape* get_or_prune_cached_forward_transition(TransitionKey const&);
Shape* get_or_prune_cached_prototype_transition(Object* prototype);

View file

@ -30,13 +30,6 @@ public:
virtual void remove_dead_cells(Badge<Heap>) override;
private:
#ifdef JS_TRACK_ZOMBIE_CELLS
virtual void did_become_zombie() override
{
deregister();
}
#endif
void visit_edges(Visitor&) override;
HashMap<Cell*, Value> m_values; // This stores Cell pointers instead of Object pointers to aide with sweeping

View file

@ -32,13 +32,6 @@ public:
private:
virtual void visit_edges(Visitor&) override;
#ifdef JS_TRACK_ZOMBIE_CELLS
virtual void did_become_zombie() override
{
deregister();
}
#endif
Object* m_value { nullptr };
u32 m_last_execution_generation { 0 };
};

View file

@ -30,13 +30,6 @@ public:
virtual void remove_dead_cells(Badge<Heap>) override;
private:
#ifdef JS_TRACK_ZOMBIE_CELLS
virtual void did_become_zombie() override
{
deregister();
}
#endif
HashTable<Cell*> m_values; // This stores Cell pointers instead of Object pointers to aide with sweeping
};