mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:58:11 +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:
parent
cd7dbe3e97
commit
b9eb8d00ca
2 changed files with 6 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue