[Differential] [Request, 14 lines] D1913: Cache the caption of ShellSurface in ShellClient

graesslin (Martin Gräßlin) noreply at phabricator.kde.org
Thu Jun 16 11:37:43 UTC 2016


graesslin created this revision.
graesslin added reviewers: KWin, Plasma on Wayland.
Restricted Application added subscribers: kwin, plasma-devel.
Restricted Application added projects: Plasma on Wayland, KWin.

REVISION SUMMARY
  If the ShellSurface gets destroyed while a decoration repaint is pending,
  it is possible that on tear down the decoration calls into
  ShellClient::caption. This used to call into ShellSurfaceInterface::title
  which accesses a d-ptr which is already destroyed at that point.
  
  This change caches the caption instead of delegating to ShellSurface,
  just like almost everything else caches. Thus the tear down cannot access
  invalid memory.
  
  Once we can depend on Frameworks 5.24, we should also make sure to
  connect to the new Resource::unbound signal to be able to handle tear
  down prior to the object being completely deleted.

TEST PLAN
  Unfortunately no test case as this depends on phase-of-moon
  aligning of destruction of the interfaces

REPOSITORY
  rKWIN KWin

BRANCH
  shell-client-cache-caption

REVISION DETAIL
  https://phabricator.kde.org/D1913

AFFECTED FILES
  shell_client.cpp
  shell_client.h

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: graesslin, #kwin, #plasma_on_wayland
Cc: plasma-devel, kwin, hardening, jensreuterberg, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160616/5ec83388/attachment.html>


More information about the Plasma-devel mailing list