зеркало из https://github.com/mozilla/pjs.git
Made sure that tabs with undefined title or undefined last used date can't break sort ordering. See bug 481326.
This commit is contained in:
Родитель
5e6abe5214
Коммит
392984341a
|
@ -66,6 +66,15 @@ TabSetRecord.prototype = {
|
||||||
addTab: function TabSetRecord_addTab(title, urlHistory, lastUsed) {
|
addTab: function TabSetRecord_addTab(title, urlHistory, lastUsed) {
|
||||||
if (!this.cleartext.tabs)
|
if (!this.cleartext.tabs)
|
||||||
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,
|
this.cleartext.tabs.push( {title: title,
|
||||||
urlHistory: urlHistory,
|
urlHistory: urlHistory,
|
||||||
lastUsed: lastUsed});
|
lastUsed: lastUsed});
|
||||||
|
|
Загрузка…
Ссылка в новой задаче