From 392984341a21653b413235d8cd9c9a620fe3eb61 Mon Sep 17 00:00:00 2001 From: "jonathandicarlo@jonathan-dicarlos-macbook-pro.local" Date: Wed, 18 Mar 2009 21:07:42 -0700 Subject: [PATCH] Made sure that tabs with undefined title or undefined last used date can't break sort ordering. See bug 481326. --- services/sync/modules/type_records/tabs.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/services/sync/modules/type_records/tabs.js b/services/sync/modules/type_records/tabs.js index 4b4d1188c1b..187b5ef76f5 100644 --- a/services/sync/modules/type_records/tabs.js +++ b/services/sync/modules/type_records/tabs.js @@ -66,6 +66,15 @@ TabSetRecord.prototype = { addTab: function TabSetRecord_addTab(title, urlHistory, lastUsed) { if (!this.cleartext.tabs) this.cleartext.tabs = []; + if (!title) { + title = ""; + } + if (!lastUsed) { + lastUsed = 0; + } + if (!urlHistory || urlHistory.length == 0) { + return; + } this.cleartext.tabs.push( {title: title, urlHistory: urlHistory, lastUsed: lastUsed});