1
0
Fork 0
mutter-performance-source/clutter
Daniel van Vugt 3d94c7cc2d clutter/actor: Do clutter_actor_destroy_all_children without an iterator
`clutter_actor_iter_destroy` will try to match up the iterator's `age`
with that of the parent ("root") actor:

```
g_return_if_fail (ri->age == ri->root->priv->age);
```

In a simple actor graph that's completely reasonable but somewhere in the
more complex graph of gnome-shell the parent's `age` was skipping ahead
faster than that of the iterator. This could happen in theory if the
destroy indirectly leads to more children being destroyed than the
iterator has visited.

So there's no evidence of actual corruption, only the age check might
fail in a `clutter_actor_iter_destroy` loop because the age check itself
can't handle all possible valid scenarios.

Since our only mandate is to destroy all children, we can do that reliably
without an iterator and thus without assuming anything about the parent's
`age` counter.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4747
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2074>
2022-07-18 17:13:01 +08:00
..
clutter clutter/actor: Do clutter_actor_destroy_all_children without an iterator 2022-07-18 17:13:01 +08:00
.gitignore clutter: Remove clutter specific version 2018-11-06 17:17:36 +01:00
meson.build meson: Split x11 option into backend/xwayland 2022-05-25 16:42:04 +02:00