After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 777934 - background: Disconnect from 'prepare-for-sleep' signal
background: Disconnect from 'prepare-for-sleep' signal
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2017-01-30 12:34 UTC by Rui Matos
Modified: 2017-01-31 13:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
background: Remove a couple of unused variables (1.21 KB, patch)
2017-01-30 12:34 UTC, Rui Matos
committed Details | Review
background: Disconnect from 'prepare-for-sleep' signal (1.35 KB, patch)
2017-01-30 12:34 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2017-01-30 12:34:25 UTC
.
Comment 1 Rui Matos 2017-01-30 12:34:30 UTC
Created attachment 344531 [details] [review]
background: Remove a couple of unused variables

Nothing uses these.
Comment 2 Rui Matos 2017-01-30 12:34:36 UTC
Created attachment 344532 [details] [review]
background: Disconnect from 'prepare-for-sleep' signal

This signal connection was keeping Background instances from being
garbage collected.
Comment 3 Florian Müllner 2017-01-30 23:06:41 UTC
Review of attachment 344532 [details] [review]:

Good catch

::: js/ui/background.js
@@ +258,1 @@
         LoginManager.getLoginManager().connect('prepare-for-sleep',

Icky indentation - either increase the indentation of the block, or use something like:

let loginManager = LoginManager.getLoginManager();
this._preparedForSleepId = loginManager.connect('prepare-for-sleep',
    ...
Comment 4 Florian Müllner 2017-01-30 23:07:01 UTC
Review of attachment 344531 [details] [review]:

Sure
Comment 5 Florian Müllner 2017-01-30 23:07:02 UTC
Review of attachment 344531 [details] [review]:

Sure
Comment 6 Rui Matos 2017-01-31 13:01:30 UTC
Pushing with the suggested indentation.

Attachment 344531 [details] pushed as 9f6f480 - background: Remove a couple of unused variables
Attachment 344532 [details] pushed as b1dcea7 - background: Disconnect from 'prepare-for-sleep' signal