diff --git a/Userland/Libraries/LibJS/Runtime/Shape.cpp b/Userland/Libraries/LibJS/Runtime/Shape.cpp index 3ea10d6da5..a62d9ed922 100644 --- a/Userland/Libraries/LibJS/Runtime/Shape.cpp +++ b/Userland/Libraries/LibJS/Runtime/Shape.cpp @@ -221,4 +221,9 @@ FLATTEN void Shape::add_property_without_transition(PropertyName const& property add_property_without_transition(property_name.to_string_or_symbol(), attributes); } +void Shape::did_become_zombie() +{ + revoke_weak_ptrs(); +} + } diff --git a/Userland/Libraries/LibJS/Runtime/Shape.h b/Userland/Libraries/LibJS/Runtime/Shape.h index d068791692..0d2c817a85 100644 --- a/Userland/Libraries/LibJS/Runtime/Shape.h +++ b/Userland/Libraries/LibJS/Runtime/Shape.h @@ -88,6 +88,7 @@ public: private: virtual const char* class_name() const override { return "Shape"; } virtual void visit_edges(Visitor&) override; + virtual void did_become_zombie() override; Shape* get_or_prune_cached_forward_transition(TransitionKey const&); void ensure_property_table() const;