Bug 609592 - Win7 JumpList is freeing up resources too early for History.

r=jimm a=gavin
This commit is contained in:
Marco Bonardo 2010-11-08 15:03:51 +01:00
Родитель 44659dcaf9
Коммит bfa9416ff1
1 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@ -260,10 +260,7 @@ var WinTaskbarJumpList =
_pendingStatements: {},
_hasPendingStatements: function WTBJL__hasPendingStatements() {
for (let listType in this._pendingStatements) {
return true;
}
return false;
return Object.keys(this._pendingStatements).length > 0;
},
_buildList: function WTBJL__buildList() {
@ -344,6 +341,11 @@ var WinTaskbarJumpList =
},
_buildFrequent: function WTBJL__buildFrequent() {
// If history is empty, just bail out.
if (!PlacesUtils.history.hasHistoryEntries) {
return;
}
// Windows supports default frequent and recent lists,
// but those depend on internal windows visit tracking
// which we don't populate. So we build our own custom
@ -377,6 +379,11 @@ var WinTaskbarJumpList =
},
_buildRecent: function WTBJL__buildRecent() {
// If history is empty, just bail out.
if (!PlacesUtils.history.hasHistoryEntries) {
return;
}
var items = Cc["@mozilla.org/array;1"].
createInstance(Ci.nsIMutableArray);
// Frequent items will be skipped, so we select a double amount of