mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibJS: Revoke any outstanding WeakPtr<Shape> when zombifying shapes
The forward transition cache in Shape uses WeakPtr<Shape> to learn when a cached transition has been garbage collected. When running in zombification mode, we have to explicitly revoke any outstanding WeakPtrs to a Shape when it becomes a zombie. That ensures that it gets pruned from transition caches.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user