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 668087 - Fix timeout callback leaks
Fix timeout callback leaks
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: 2012-01-17 11:27 UTC by drago01
Modified: 2012-01-17 15:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix timeout callback leaks (1.46 KB, patch)
2012-01-17 11:27 UTC, drago01
committed Details | Review

Description drago01 2012-01-17 11:27:54 UTC
See patch.
Comment 1 drago01 2012-01-17 11:27:56 UTC
Created attachment 205437 [details] [review]
Fix timeout callback leaks

Make sure that we don't leak oneshot timeout handlers in main.js and
polkitAuthenticationAgent.js by making the callback return false.
Comment 2 Florian Müllner 2012-01-17 11:37:42 UTC
Review of attachment 205437 [details] [review]:

Makes sense
Comment 3 drago01 2012-01-17 11:38:39 UTC
Attachment 205437 [details] pushed as 3f32846 - Fix timeout callback leaks
Comment 4 Owen Taylor 2012-01-17 15:31:02 UTC
This is a good cleanup, but i don't think actually fixes a leak - the return of a javascript function without an explicit return statement is the undefined value which is boolean false.
Comment 5 drago01 2012-01-17 15:55:22 UTC
(In reply to comment #4)
> This is a good cleanup, but i don't think actually fixes a leak - the return of
> a javascript function without an explicit return statement is the undefined
> value which is boolean false.

Ah OK, that makes sense. I spotted the first one while reading _windowRemoved but wasn't sure what the "default return value" would be. But yeah undefined and thus false makes sense.