Bug 1415567 - Port bug 1414096 to TB: Remove {get,set}ComplexValue use of nsISupportsString (hand-written patch). r=jorgk
authorFlorian Queze <florian@queze.net>
Wed, 08 Nov 2017 16:18:15 +0100
changeset 29348 4b31b1b319fc2f1f8dfee5bcfb7a3cd9541bcb50
parent 29347 3a0c2f6597efa43aaf7fc50f6b28daa36968df23
child 29349 90cf5e82cb3dfb38d84185925596a62e29176e3e
push id2068
push userclokep@gmail.com
push dateMon, 13 Nov 2017 19:02:14 +0000
treeherdercomm-beta@9c7e7ce8672b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk
bugs1415567, 1414096
Bug 1415567 - Port bug 1414096 to TB: Remove {get,set}ComplexValue use of nsISupportsString (hand-written patch). r=jorgk
mail/base/modules/distribution.js
--- a/mail/base/modules/distribution.js
+++ b/mail/base/modules/distribution.js
@@ -37,24 +37,23 @@ var TBDistCustomizer = {
 
     // Get the entire preferences tree (defaults is an instance of nsIPrefBranch)
     let defaults = Services.prefs.getDefaultBranch(null);
 
     // Set the following user prefs
     defaults.setCharPref("distribution.id", this._ini.getString("Global", "id"));
     defaults.setCharPref("distribution.version",
                          this._ini.getString("Global", "version"));
-    let partnerAbout = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString);
+    let partnerAbout;
     if (globalPrefs["about." + this._locale]) {
-      partnerAbout.data = this._ini.getString("Global", "about." + this._locale);
+      partnerAbout = this._ini.getString("Global", "about." + this._locale);
     } else {
-      partnerAbout.data = this._ini.getString("Global", "about");
+      partnerAbout = this._ini.getString("Global", "about");
     }
-    defaults.setComplexValue("distribution.about",
-                             Ci.nsISupportsString, partnerAbout);
+    defaults.setStringPref("distribution.about", partnerAbout);
 
     if (sections["Preferences"]) {
       let keys = this._ini.getKeys("Preferences");
       while (keys.hasMore()) {
         let key = keys.getNext();
         try {
           // Get the string value of the key
           let value = eval(this._ini.getString("Preferences", key));