[gnome-shell/gnome-3-14] BackgroundCache: plug an Animation object leak



commit deb651acbf0b0ab6030ef77cd0b269d3a52fbd67
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Oct 27 16:45:31 2014 +0100

    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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=739252

 js/ui/background.js |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/background.js b/js/ui/background.js
index 4987a4f..ad0cacc 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -162,6 +162,7 @@ const BackgroundCache = new Lang.Class({
                 }));
                 GLib.Source.set_name_by_id(id, '[gnome-shell] params.onLoaded');
             }
+            return;
         }
 
         let animation = new Animation({ filename: params.filename });


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]