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

[tor-commits] [tor-browser/tor-browser-78.7.1esr-10.0-1] Bug 31563: force reloading search extensions if extensions.enabledScopes has changed



commit 1413019979e5ecc34fef27af9f415ff7d05e2196
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/SearchService.jsm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/toolkit/components/search/SearchService.jsm b/toolkit/components/search/SearchService.jsm
index 46b992bec8ec..608f3c475458 100644
--- a/toolkit/components/search/SearchService.jsm
+++ b/toolkit/components/search/SearchService.jsm
@@ -975,6 +975,7 @@ SearchService.prototype = {
     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;
@@ -988,6 +989,10 @@ SearchService.prototype = {
     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._searchOrder;
       // For built-in engines we don't want to store all their data in the cache
@@ -1049,7 +1054,8 @@ 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