mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 524270 - Make the second getChildList parameter optional. r=bsmedberg
This commit is contained in:
parent
0edaf9a46e
commit
6a530b2454
@ -265,7 +265,7 @@ function getModifiedPrefs() {
|
||||
function getWhitelistedPrefNames() {
|
||||
let results = [];
|
||||
PREFS_WHITELIST.forEach(function (prefStem) {
|
||||
let prefNames = gPrefService.getChildList(prefStem, {});
|
||||
let prefNames = gPrefService.getChildList(prefStem);
|
||||
results = results.concat(prefNames);
|
||||
});
|
||||
return results;
|
||||
|
@ -1540,8 +1540,7 @@ function initializeSanitizer()
|
||||
*/
|
||||
if (!gPrefService.getBoolPref("privacy.sanitize.migrateFx3Prefs")) {
|
||||
let itemBranch = gPrefService.getBranch("privacy.item.");
|
||||
let itemCount = { value: 0 };
|
||||
let itemArray = itemBranch.getChildList("", itemCount);
|
||||
let itemArray = itemBranch.getChildList("");
|
||||
|
||||
// See if any privacy.item prefs are set
|
||||
let doMigrate = itemArray.some(function (name) itemBranch.prefHasUserValue(name));
|
||||
|
@ -806,7 +806,7 @@ WebContentConverterRegistrar.prototype = {
|
||||
* branch and stop cycling once that's true. This doesn't fix the case
|
||||
* where a user manually removes a reader, but that's not supported yet!
|
||||
*/
|
||||
var vals = branch.getChildList("", {});
|
||||
var vals = branch.getChildList("");
|
||||
if (vals.length == 0)
|
||||
return;
|
||||
|
||||
@ -832,7 +832,7 @@ WebContentConverterRegistrar.prototype = {
|
||||
getService(Ci.nsIPrefService);
|
||||
|
||||
var kids = ps.getBranch(PREF_CONTENTHANDLERS_BRANCH)
|
||||
.getChildList("", {});
|
||||
.getChildList("");
|
||||
|
||||
// first get the numbers of the providers by getting all ###.uri prefs
|
||||
var nums = [];
|
||||
@ -857,7 +857,7 @@ WebContentConverterRegistrar.prototype = {
|
||||
// so that getWebContentHandlerByURI can return successfully.
|
||||
try {
|
||||
var autoBranch = ps.getBranch(PREF_CONTENTHANDLERS_AUTO);
|
||||
var childPrefs = autoBranch.getChildList("", { });
|
||||
var childPrefs = autoBranch.getChildList("");
|
||||
for (var i = 0; i < childPrefs.length; ++i) {
|
||||
var type = childPrefs[i];
|
||||
var uri = autoBranch.getCharPref(type);
|
||||
|
@ -269,8 +269,7 @@ RTestIndexList.prototype = {
|
||||
|
||||
load : function()
|
||||
{
|
||||
var count = {value:null};
|
||||
var prefList = this.mPrefBranch.getChildList("", count);
|
||||
var prefList = this.mPrefBranch.getChildList("");
|
||||
|
||||
var i = 0;
|
||||
for (var pref in prefList) {
|
||||
|
@ -329,7 +329,8 @@ interface nsIPrefBranch : nsISupports
|
||||
* @return NS_OK The preference list was successfully retrieved.
|
||||
* @return Other The preference(s) do not exist or an error occurred.
|
||||
*/
|
||||
void getChildList(in string aStartingAt, out unsigned long aCount,
|
||||
void getChildList(in string aStartingAt,
|
||||
[optional] out unsigned long aCount,
|
||||
[array, size_is(aCount), retval] out string aChildArray);
|
||||
|
||||
/**
|
||||
|
@ -211,7 +211,7 @@ PreferenceBranch.prototype = {
|
||||
// modified: true, false (prefHasUserValue)
|
||||
find : function prefs_find(aOptions) {
|
||||
var retVal = [];
|
||||
var items = this._prefs.getChildList("", []);
|
||||
var items = this._prefs.getChildList("");
|
||||
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
retVal.push(new Preference(items[i], this));
|
||||
|
@ -2975,7 +2975,7 @@ SearchService.prototype = {
|
||||
|
||||
try {
|
||||
var extras =
|
||||
gPrefSvc.getChildList(BROWSER_SEARCH_PREF + "order.extra.", { });
|
||||
gPrefSvc.getChildList(BROWSER_SEARCH_PREF + "order.extra.");
|
||||
|
||||
for each (prefName in extras) {
|
||||
engineName = gPrefSvc.getCharPref(prefName);
|
||||
@ -3173,8 +3173,7 @@ SearchService.prototype = {
|
||||
|
||||
// First, look at the "browser.search.order.extra" branch.
|
||||
try {
|
||||
var extras = gPrefSvc.getChildList(BROWSER_SEARCH_PREF + "order.extra.",
|
||||
{});
|
||||
var extras = gPrefSvc.getChildList(BROWSER_SEARCH_PREF + "order.extra.");
|
||||
|
||||
for each (var prefName in extras) {
|
||||
engineName = gPrefSvc.getCharPref(prefName);
|
||||
|
@ -334,17 +334,14 @@ function onConfigLoad()
|
||||
// Unhide the warning message
|
||||
function ShowPrefs()
|
||||
{
|
||||
var prefCount = { value: 0 };
|
||||
var prefArray = gPrefBranch.getChildList("", prefCount);
|
||||
var prefArray = gPrefBranch.getChildList("");
|
||||
|
||||
for (var i = 0; i < prefCount.value; ++i)
|
||||
{
|
||||
var prefName = prefArray[i];
|
||||
prefArray.forEach(function (prefName) {
|
||||
if (/^capability\./.test(prefName)) // avoid displaying "private" preferences
|
||||
continue;
|
||||
return;
|
||||
|
||||
fetchPref(prefName, gPrefArray.length);
|
||||
}
|
||||
});
|
||||
|
||||
var descending = document.getElementsByAttribute("sortDirection", "descending");
|
||||
if (descending.item(0)) {
|
||||
|
@ -208,7 +208,7 @@ function getUpdateChannel() {
|
||||
}
|
||||
|
||||
try {
|
||||
var partners = gPref.getChildList(PREF_PARTNER_BRANCH, { });
|
||||
var partners = gPref.getChildList(PREF_PARTNER_BRANCH);
|
||||
if (partners.length) {
|
||||
channel += "-cck";
|
||||
partners.sort();
|
||||
|
@ -348,7 +348,7 @@ var gUpdates = {
|
||||
var ps = CoC["@mozilla.org/preferences-service;1"].
|
||||
getService(CoI.nsIPrefService);
|
||||
var logBranch = ps.getBranch(PREF_APP_UPDATE_LOG_BRANCH);
|
||||
var modules = logBranch.getChildList("", { value: 0 });
|
||||
var modules = logBranch.getChildList("");
|
||||
|
||||
for (var i = 0; i < modules.length; ++i) {
|
||||
if (logBranch.prefHasUserValue(modules[i]))
|
||||
|
@ -153,7 +153,7 @@ XPCOMUtils.defineLazyGetter(this, "gLogEnabled", function() {
|
||||
let ps = Cc["@mozilla.org/preferences-service;1"].
|
||||
getService(Ci.nsIPrefService);
|
||||
let logBranch = ps.getBranch(PREF_APP_UPDATE_LOG_BRANCH);
|
||||
let modules = logBranch.getChildList("", { value: 0 });
|
||||
let modules = logBranch.getChildList("");
|
||||
for (let i = 0; i < modules.length; ++i) {
|
||||
if (logBranch.prefHasUserValue(modules[i]))
|
||||
logEnabled[modules[i]] = logBranch.getBoolPref(modules[i]);
|
||||
@ -506,7 +506,7 @@ function getUpdateChannel() {
|
||||
}
|
||||
|
||||
try {
|
||||
var partners = gPref.getChildList(PREF_PARTNER_BRANCH, { });
|
||||
var partners = gPref.getChildList(PREF_PARTNER_BRANCH);
|
||||
if (partners.length) {
|
||||
channel += "-cck";
|
||||
partners.sort();
|
||||
|
@ -235,7 +235,7 @@ HandlerService.prototype = {
|
||||
getService(Ci.nsIPrefService);
|
||||
|
||||
let schemesPrefBranch = prefSvc.getBranch("gecko.handlerService.schemes.");
|
||||
let schemePrefList = schemesPrefBranch.getChildList("", {});
|
||||
let schemePrefList = schemesPrefBranch.getChildList("");
|
||||
|
||||
var schemes = {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user