From da7cd2807fa9090805c0b82a9ea480e32086c1c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 23 Aug 2018 18:14:38 +0200 Subject: [PATCH] search: Cancel search provider operations on clear Ensure that the search provider operations (just getResultMetas requests in the current implementation) in progress are properly cancelled when we clear the UI, otherwise returned results might still be added when not needed. This is triggered for each provider by the SearchResults reset. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/205 --- js/ui/search.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/ui/search.js b/js/ui/search.js index 1fb54b4c9..804be9593 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -192,6 +192,7 @@ var SearchResultsBase = new Lang.Class({ }, clear() { + this._cancellable.cancel(); for (let resultId in this._resultDisplays) this._resultDisplays[resultId].actor.destroy(); this._resultDisplays = {};