Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
Tor Browser
Commits
fb76d3c2
Commit
fb76d3c2
authored
Aug 31, 2019
by
Alex Catarineu
Committed by
Matthew Finkel
Mar 17, 2021
Browse files
Bug 31563: force reloading search extensions if extensions.enabledScopes has changed
parent
2659c9c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
toolkit/components/search/SearchService.jsm
View file @
fb76d3c2
...
...
@@ -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) {
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment