• Simon McVittie's avatar
    ShellApp: Use g_signal_connect_object for window signals · 0f531d8c
    Simon McVittie authored
    A window being unmanaged can cause the ShellApp to be removed from
    the ShellAppSystem, which if we are unlucky is the app's last
    reference, causing it to be disposed and freed. It would be bad if this
    happened before we finished handling the signal.
    
    Use g_signal_connect_object to ensure that a reference is held to
    the ShellApp for the duration of the signal handler, delaying its
    last-unref.
    
    In particular, when a signal handler calls _shell_app_remove_window(),
    there is a brief period for which ShellApp breaks the intended
    invariant (see !497) that app->running_state is non-NULL if and only if
    app->running_state->windows is also non-NULL (non-empty). Freeing the
    ShellApp at this point would cause a crash. This seems likely to be the
    root cause of <#750>,
    <#822> and
    <https://bugs.debian.org/926212>.
    Signed-off-by: 's avatarSimon McVittie <smcv@debian.org>
    0f531d8c
Name
Last commit
Last update
.gitlab-ci Loading commit data...
.settings Loading commit data...
data Loading commit data...
docs/reference Loading commit data...
js Loading commit data...
man Loading commit data...
meson Loading commit data...
po Loading commit data...
src Loading commit data...
subprojects Loading commit data...
test Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.gitmodules Loading commit data...
COPYING Loading commit data...
HACKING.md Loading commit data...
NEWS Loading commit data...
README.md Loading commit data...
README.mdwn Loading commit data...
cldr2json.py Loading commit data...
config.h.meson Loading commit data...
gnome-shell.doap Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...