[gnome-shell] Search: be resilient against buggy search providers
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Search: be resilient against buggy search providers
- Date: Wed, 11 Mar 2015 20:48:33 +0000 (UTC)
commit 8b5a44e11924c3f572238955fb26120e3d5342ac
Author: Giovanni Campagna <gcampagna gnome org>
Date: Sun Mar 8 16:20:10 2015 -0700
Search: be resilient against buggy search providers
If a search provider returns a meta without a name, don't crash
constructing the actor.
https://bugzilla.gnome.org/show_bug.cgi?id=745861
js/ui/search.js | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/search.js b/js/ui/search.js
index 7e7cb83..e307ce3 100644
--- a/js/ui/search.js
+++ b/js/ui/search.js
@@ -205,6 +205,13 @@ const SearchResultsBase = new Lang.Class({
callback(false);
return;
}
+ if (metas.some(function(meta) {
+ return !meta.name || !meta.id;
+ })) {
+ log('Invalid result meta returned from search provider ' + this.provider.id);
+ callback(false);
+ return;
+ }
metasNeeded.forEach(Lang.bind(this, function(resultId, i) {
let meta = metas[i];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]