Skip to content
Commit c82a52a4 authored by Kristian Høgsberg's avatar Kristian Høgsberg
Browse files

wayland-server: Remove error event posting from wl_resource_create

The wl_client_add/new_object() functions sends out an NO_MEMORY error if
the allocation fails.  This was convenient in a couple of places where
that was all the error handling that was needed.  Unfortunately that
looks like out-of-memory isn't handled at the call site and set a bad
precedent for not cleaning up properly or not handling at all.

As we're introducing wl_resource_create() as a replacement for those two
functions, let's remove the automatic error event posting and require
the caller to do that if necessary.

This commit also introduces a new helper, wl_client_post_no_memory() to
make it possible to send NO_MEMORY events from bind where we don't have
a wl_resource.
parent b5b11650
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