Fixed tab encoding bug on Fennec
authorjonathandicarlo@jonathan-dicarlos-macbook-pro.local
Tue, 10 Feb 2009 21:54:11 -0800
changeset 45239 1e58336e9f6db16bfa42d16e5548bd8843810cc2
parent 45238 09e78e93eda5d18d763629dfe400494f8cf28a8e
child 45240 be0e051bd478c6df4374b5e58a010a890cba84aa
push idunknown
push userunknown
push dateunknown
Fixed tab encoding bug on Fennec
services/sync/modules/engines/tabs.js
services/sync/modules/type_records/tabs.js
--- a/services/sync/modules/engines/tabs.js
+++ b/services/sync/modules/engines/tabs.js
@@ -188,17 +188,17 @@ TabStore.prototype = {
   },
 
   _addFennecTabsToRecord: function TabStore__addFennecTabs(record) {
     let wm = Cc["@mozilla.org/appshell/window-mediator;1"]
 	       .getService(Ci.nsIWindowMediator);
     let browserWindow = wm.getMostRecentWindow("navigator:browser");
     for each (let tab in browserWindow.Browser._tabs ) {
       let title = tab.browser.contentDocument.title;
-      let url = tab.browser.contentWindow.location;
+      let url = tab.browser.contentWindow.location.toString();
       let urlHistory = [url];
       // TODO how to get older entries in urlHistory?
       dump("Making tab with title = " + title + ", url = " + url + "\n");
       record.addTab(title, urlHistory);
     }
   },
 
   itemExists: function TabStore_itemExists(id) {
--- a/services/sync/modules/type_records/tabs.js
+++ b/services/sync/modules/type_records/tabs.js
@@ -61,18 +61,17 @@ TabSetRecord.prototype = {
     this._CryptoWrap_init(uri);
     this.cleartext = {
     };
   },
 
   addTab: function TabSetRecord_addTab(title, urlHistory) {
     if (!this.cleartext.tabs)
       this.cleartext.tabs = [];
-    this.cleartext.tabs.push( { title: title,
-				urlHistory: urlHistory });
+    this.cleartext.tabs.push( {title: title, urlHistory: urlHistory });
   },
 
   getAllTabs: function TabSetRecord_getAllTabs() {
     return this.cleartext.tabs;
   },
 
   setClientName: function TabSetRecord_setClientName(value) {
     this.cleartext.clientName = value;