[Differential] [Request, 35 lines] D1868: [server] Introduce a Resource::unbound signal emitted from unbind handler
graesslin (Martin Gräßlin)
noreply at phabricator.kde.org
Tue Jun 14 12:55:24 UTC 2016
graesslin created this revision.
graesslin added a reviewer: Plasma on Wayland.
Restricted Application added a subscriber: plasma-devel.
Restricted Application added a project: Plasma on Wayland.
REVISION SUMMARY
So far for internal cleanup we mostly listen to QObject::destroyed.
When a Resource gets unbind the wl_resource is set to null and the
Resource gets deleteLater. This creates a short time frame when the
Resource is still there, but the wl_resource is null. For most internal
usages the Resource is completely useless at that point and should no
longer be considered. So far it was still considered and could hit
crashers, if a code path did not nullptr check. Unfortunately
libwayland-server is not nullptr safe: if called with a null value it
tends to crash.
So this check introduces a new signal unbound which can be listend to
in addition to the destroyed signal. It's used in SeatInterface for
DataDeviceInterface, where we experienced a crash related to that.
REPOSITORY
rKWAYLAND KWayland
BRANCH
resource-unbound
REVISION DETAIL
https://phabricator.kde.org/D1868
AFFECTED FILES
src/server/resource.cpp
src/server/resource.h
src/server/seat_interface.cpp
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: graesslin, #plasma_on_wayland
Cc: plasma-devel, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160614/c9a984c5/attachment.html>
More information about the Plasma-devel
mailing list