Commit e2a2fee9 authored by Alex Catarineu's avatar Alex Catarineu
Browse files

Bug 31563: force reloading search extensions if extensions.enabledScopes has changed

parent 2c607317
......@@ -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 {
......
......@@ -1017,7 +1017,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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment