Bug 1159248 - Simply pre-fill window.tabs[] with empty tab states instead of calling TabState.collect() to avoid perf regressions r=smacleod

This commit is contained in:
Tim Taubert 2015-05-04 13:42:43 +02:00
Родитель d43c4e9a53
Коммит 0367f94a69
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -2754,7 +2754,8 @@ let SessionStoreInternal = {
// fill the array with at least empty tabData objects until |_tPos| or
// we'll end up with |null| entries.
for (let tab of Array.slice(tabbrowser.tabs, 0, tab._tPos)) {
this._windows[window.__SSi].tabs.push(TabState.collect(tab));
let emptyState = {entries: [], lastAccessed: tab.lastAccessed};
this._windows[window.__SSi].tabs.push(emptyState);
}
// Update the tab state in case we shut down without being notified.