[gnome-shell] background: Pass cancellable when querying file info



commit dd28832dcdb7ef390cc444ec046cfafce56ebc81
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Apr 13 20:14:47 2022 +0200

    background: Pass cancellable when querying file info
    
    Otherwise it is possible that the operation completes successfully
    after the background has been destroyed, which will throw a warning
    (caused by accessing the this._fileWatches object after it has been
    nulled).
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5337
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2268>

 js/ui/background.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/background.js b/js/ui/background.js
index 198194a50b..825fee0d9b 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -492,7 +492,7 @@ var Background = GObject.registerClass({
                 Gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
                 Gio.FileQueryInfoFlags.NONE,
                 0,
-                null);
+                this._cancellable);
         } catch (e) {
             this._setLoaded();
             return;


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