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>
This commit is contained in:
Florian Müllner 2022-04-13 20:14:47 +02:00 committed by Marge Bot
parent e69da36095
commit dd28832dcd

View File

@ -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;