Bug 657067 - XPIProvider.jsm refers to nsIPrefBranch.getComplexPref... which doesn't exist [r=dtownsend]
authorMark Finkle <mfinkle@mozilla.com>
Tue, 17 May 2011 00:12:40 -0400
changeset 69591 f717485edc5188c4991a1ba010a7ad4c3e3ee83e
parent 69590 9968ed6b629a1b2c937e0cb1053a56c91f96c2d2
child 69592 ef9c0d8872cc18cb3d8664083ff7a6d44e38326c
push id20036
push usermfinkle@mozilla.com
push dateTue, 17 May 2011 04:13:20 +0000
treeherdermozilla-central@f717485edc51 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdtownsend
bugs657067
milestone6.0a1
first release with
nightly linux32
f717485edc51 / 6.0a1 / 20110517030625 / files
nightly linux64
f717485edc51 / 6.0a1 / 20110517030625 / files
nightly mac
f717485edc51 / 6.0a1 / 20110517030625 / files
nightly win32
f717485edc51 / 6.0a1 / 20110517030625 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 657067 - XPIProvider.jsm refers to nsIPrefBranch.getComplexPref... which doesn't exist [r=dtownsend]
toolkit/mozapps/extensions/XPIProvider.jsm
toolkit/mozapps/extensions/nsBlocklistService.js
--- a/toolkit/mozapps/extensions/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/XPIProvider.jsm
@@ -339,17 +339,17 @@ SafeInstallOperation.prototype = {
 
 /**
  * Gets the currently selected locale for display.
  * @return  the selected locale or "en-US" if none is selected
  */
 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");
 }
 
 /**
  * Selects the closest matching locale from a list of locales.
  *
@@ -1224,19 +1224,19 @@ var Prefs = {
    * @param  aName
    *         The name of the preference
    * @param  aType
    *         The interface type of the preference
    * @param  aDefaultValue
    *         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) {
     }
     return aDefaultValue;
   },
 
   /**
    * Gets a boolean preference.
--- a/toolkit/mozapps/extensions/nsBlocklistService.js
+++ b/toolkit/mozapps/extensions/nsBlocklistService.js
@@ -241,18 +241,18 @@ function matchesOSABI(blocklistElement) 
  * Gets the current value of the locale.  It's possible for this preference to
  * be localized, so we have to do a little extra work here.  Similar code
  * exists in nsHttpHandler.cpp when building the UA string.
  */
 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);
 }
 
 /**
  * Read the update channel from defaults only.  We do this to ensure that
  * the channel is tightly coupled with the application and does not apply