зеркало из https://github.com/mozilla/pjs.git
Bug 657067 - XPIProvider.jsm refers to nsIPrefBranch.getComplexPref... which doesn't exist [r=dtownsend]
This commit is contained in:
Родитель
62719456a9
Коммит
1803d750b3
|
@ -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) {
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче