Skip to content
  • Kristian Høgsberg's avatar
    wayland-server: Remove error event posting from wl_resource_create · c82a52a4
    Kristian Høgsberg authored
    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.
    c82a52a4