Bug 1415567 - Port bug 1414096 to SM: Remove {get,set}ComplexValue use of nsISupportsString (hand-written patch). r=jorgk
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Wed, 08 Nov 2017 11:21:00 +0100
changeset 29349 90cf5e82cb3dfb38d84185925596a62e29176e3e
parent 29348 4b31b1b319fc2f1f8dfee5bcfb7a3cd9541bcb50
child 29350 6025ae6cc52479c3c0d99f608513fddd354e8e53
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 SM: Remove {get,set}ComplexValue use of nsISupportsString (hand-written patch). r=jorgk
suite/common/src/nsSuiteGlue.js
--- a/suite/common/src/nsSuiteGlue.js
+++ b/suite/common/src/nsSuiteGlue.js
@@ -382,21 +382,18 @@ SuiteGlue.prototype = {
         case "view-source":
         case "chrome":
         case "resource":
         case "data":
         case "wyciwyg":
         case "javascript":
           break;
         default:
-          var str = Components.classes["@mozilla.org/supports-string;1"]
-                              .createInstance(Components.interfaces.nsISupportsString);
-          str.data = aLocation.spec;
-          Services.prefs.setComplexValue("browser.history.last_page_visited",
-                                         Components.interfaces.nsISupportsString, str);
+          Services.prefs.setStringPref("browser.history.last_page_visited",
+                                       aLocation.spec);
           break;
       }
     }
   },
 
   // initialization (called on application startup)
   _init: function()
   {