зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1835625 - Let nightly users set custom param prefs. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D179352
This commit is contained in:
Родитель
183be490b1
Коммит
1b230888fa
|
@ -4,6 +4,7 @@
|
|||
|
||||
/* eslint no-shadow: error, mozilla/no-aArgs: error */
|
||||
|
||||
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
@ -120,7 +121,12 @@ const ParamPreferenceCache = {
|
|||
]),
|
||||
|
||||
initCache() {
|
||||
this.branch = Services.prefs.getDefaultBranch(
|
||||
// Preference params are normally only on the default branch to avoid these being easily changed.
|
||||
// We allow them on the normal branch in nightly builds to make testing easier.
|
||||
let branchFetcher = AppConstants.NIGHTLY_BUILD
|
||||
? "getBranch"
|
||||
: "getDefaultBranch";
|
||||
this.branch = Services.prefs[branchFetcher](
|
||||
lazy.SearchUtils.BROWSER_SEARCH_PREF + "param."
|
||||
);
|
||||
this.cache = new Map();
|
||||
|
|
Загрузка…
Ссылка в новой задаче