Skip to content
Commit 39bebf78 authored by Simon Ser's avatar Simon Ser Committed by Héctor Orón Martínez
Browse files

server: add wl_global_set_user_data

When implementing a workaround for [1], one needs to accept a global to be
bound even though it has become stale.

Often, a global's user data is free'd when the global needs to be destroyed.
Being able to set the global's user data (e.g. to NULL) can help preventing a
use-after-free.

(The alternative is to make the compositor responsible for keeping track of
stale user data objects via e.g. refcounting.)

[1]: https://gitlab.freedesktop.org/wayland/wayland/issues/10



Signed-off-by: default avatarSimon Ser <contact@emersion.fr>
parent 8f7f845e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment