Bug 657067 - XPIProvider.jsm refers to nsIPrefBranch.getComplexPref... which doesn't exist [r=dtownsend]

This commit is contained in:
Mark Finkle 2011-05-17 00:12:40 -04:00
parent 0c31687332
commit 514ab4a720
2 changed files with 5 additions and 5 deletions

View File

@ -344,7 +344,7 @@ SafeInstallOperation.prototype = {
function getLocale() {
if (Prefs.getBoolPref(PREF_MATCH_OS_LOCALE, false))
return Services.locale.getLocaleComponentForUserAgent();
let locale = Prefs.getComplexPref(PREF_SELECTED_LOCALE, Ci.nsIPrefLocalizedString);
let locale = Prefs.getComplexValue(PREF_SELECTED_LOCALE, Ci.nsIPrefLocalizedString);
if (locale)
return locale;
return Prefs.getCharPref(PREF_SELECTED_LOCALE, "en-US");
@ -1229,9 +1229,9 @@ var Prefs = {
* A value to return if the preference does not exist
* @return the value of the preference or aDefaultValue if there is none
*/
getComplexPref: function(aName, aType, aDefaultValue) {
getComplexValue: function(aName, aType, aDefaultValue) {
try {
return Services.prefs.getComplexPref(aName, aType).data;
return Services.prefs.getComplexValue(aName, aType).data;
}
catch (e) {
}

View File

@ -246,8 +246,8 @@ function getLocale() {
try {
// Get the default branch
var defaultPrefs = gPref.getDefaultBranch(null);
return defaultPrefs.getComplexPref(PREF_GENERAL_USERAGENT_LOCALE,
Ci.nsIPrefLocalizedString).data;
return defaultPrefs.getComplexValue(PREF_GENERAL_USERAGENT_LOCALE,
Ci.nsIPrefLocalizedString).data;
} catch (e) {}
return gPref.getCharPref(PREF_GENERAL_USERAGENT_LOCALE);