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 739252 - BackgroundCache: plug an Animation object leak
BackgroundCache: plug an Animation object leak
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
3.14.2
Depends on:
Blocks:
 
 
Reported: 2014-10-27 15:54 UTC by Rui Matos
Modified: 2014-10-27 16:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
BackgroundCache: plug an Animation object leak (888 bytes, patch)
2014-10-27 15:54 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2014-10-27 15:54:04 UTC
I'm afraid I don't fully understand the code in background.js but this
patch seems to prevent a JS error that occurs some time after
disconnecting a monitor:

Gjs-WARNING **: JS ERROR: TypeError: monitor is undefined
Animation<.update@resource:///org/gnome/shell/ui/background.js:621
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Background<._updateAnimation@resource:///org/gnome/shell/ui/background.js:340
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
@resource:///org/gnome/shell/ui/background.js:403
Comment 1 Rui Matos 2014-10-27 15:54:08 UTC
Created attachment 289459 [details] [review]
BackgroundCache: plug an Animation object leak

We need to return early in case the animation file is the same,
otherwise we'll create a new Animation object and leak the previous
one.
Comment 2 Jasper St. Pierre (not reading bugmail) 2014-10-27 16:21:44 UTC
Review of attachment 289459 [details] [review]:

Nice catch.
Comment 3 Rui Matos 2014-10-27 16:52:19 UTC
Attachment 289459 [details] pushed as 260657c - BackgroundCache: plug an Animation object leak