1
0
Fork 0
mutter-performance-source/clutter
Sebastian Keller c86d8a23c3 clutter/actor: Don't write uninitialized out values on failed transform
clutter_actor_get_transformed_position() would write the uninitialized
values of v2 when clutter_actor_apply_transform_to_point() fails in
_clutter_actor_fully_transform_vertices() because the actor has not been
added to the stage yet.

When called from JS this would overwrite the zero initialized values
passed in from gjs. If the uninitialized values now happen to correspond
to one of the NaN float values used by mozjs to represent a pointer
type, this would lead to seemingly random crashes in mozjs code later
on.

Avoid this by using _clutter_actor_fully_transform_vertices() directly,
which allows us to check if it failed.

Related: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/469
Related: https://gitlab.gnome.org/GNOME/gjs/-/issues/591
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3453>
2023-12-15 15:08:22 +00:00
..
clutter clutter/actor: Don't write uninitialized out values on failed transform 2023-12-15 15:08:22 +00:00
.gitignore build: One config file to rule them all 2023-11-15 12:00:19 +00:00
meson.build cleanup: Stop allowing deprecated Cogl API usage 2023-11-15 13:13:00 +01:00