[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser/tor-browser-80.0b2-10.0-1] Bug 31563: force reloading search extensions if extensions.enabledScopes has changed
commit eb62e6318e064cc38af35d999835020b5189850a
Author: Alex Catarineu <acat@xxxxxxxxxxxxxx>
Date: Sat Aug 31 16:23:20 2019 +0200
Bug 31563: force reloading search extensions if extensions.enabledScopes has changed
---
toolkit/components/search/SearchCache.jsm | 8 ++++++++
toolkit/components/search/SearchService.jsm | 4 +++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/toolkit/components/search/SearchCache.jsm b/toolkit/components/search/SearchCache.jsm
index 017c29ee390e..511863bc76e0 100644
--- a/toolkit/components/search/SearchCache.jsm
+++ b/toolkit/components/search/SearchCache.jsm
@@ -208,6 +208,10 @@ class SearchCache {
let locale = Services.locale.requestedLocale;
let buildID = Services.appinfo.platformBuildID;
let appVersion = Services.appinfo.version;
+ let enabledScopes = Services.prefs.getIntPref(
+ "extensions.enabledScopes",
+ -1
+ );
// Allows us to force a cache refresh should the cache format change.
cache.version = SearchUtils.CACHE_VERSION;
@@ -221,6 +225,10 @@ class SearchCache {
cache.appVersion = appVersion;
cache.locale = locale;
+ // Bug 31563: we want to force reloading engines if extensions.enabledScopes
+ // pref changes
+ cache.enabledScopes = enabledScopes;
+
if (gModernConfig) {
cache.builtInEngineList = this._searchService._searchOrder;
} else {
diff --git a/toolkit/components/search/SearchService.jsm b/toolkit/components/search/SearchService.jsm
index fa17717d05b7..5fafcabe6ea4 100644
--- a/toolkit/components/search/SearchService.jsm
+++ b/toolkit/components/search/SearchService.jsm
@@ -1007,7 +1007,9 @@ SearchService.prototype = {
!cache.engines ||
cache.version != SearchUtils.CACHE_VERSION ||
cache.locale != Services.locale.requestedLocale ||
- cache.buildID != buildID;
+ cache.buildID != buildID ||
+ cache.enabledScopes !=
+ Services.prefs.getIntPref("extensions.enabledScopes", -1);
let enginesCorrupted = false;
if (!rebuildCache) {
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits