diff --git a/toolkit/mozapps/extensions/XPIProvider.jsm b/toolkit/mozapps/extensions/XPIProvider.jsm index 324c303c51c..84ad6a2cf97 100644 --- a/toolkit/mozapps/extensions/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/XPIProvider.jsm @@ -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) { } diff --git a/toolkit/mozapps/extensions/nsBlocklistService.js b/toolkit/mozapps/extensions/nsBlocklistService.js index 427977ad2a5..ec6d30e13ae 100644 --- a/toolkit/mozapps/extensions/nsBlocklistService.js +++ b/toolkit/mozapps/extensions/nsBlocklistService.js @@ -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);