Bug 398807 - backout (for zeniko@gmail.com, r=dietrich, a=beltzner)

This commit is contained in:
dietrich@mozilla.com 2008-03-17 09:11:49 -07:00
Родитель ebb3be0d90
Коммит ad1040f33a
2 изменённых файлов: 2 добавлений и 8 удалений

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

@ -632,8 +632,6 @@ pref("browser.sessionstore.postdata", 0);
pref("browser.sessionstore.privacy_level", 1); pref("browser.sessionstore.privacy_level", 1);
// how many tabs can be reopened (per window) // how many tabs can be reopened (per window)
pref("browser.sessionstore.max_tabs_undo", 10); pref("browser.sessionstore.max_tabs_undo", 10);
// maximum number of pages of back-history per tab to save
pref("browser.sessionstore.max_tab_back_history", 10);
// allow META refresh by default // allow META refresh by default
pref("accessibility.blockautorefresh", false); pref("accessibility.blockautorefresh", false);

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

@ -895,14 +895,10 @@ SessionStoreService.prototype = {
tabData.index = history.index + 1; tabData.index = history.index + 1;
} }
else if (history && history.count > 0) { else if (history && history.count > 0) {
// Cap the number of back history entries saved. (-1 = no cap) for (var j = 0; j < history.count; j++)
var cap = this._prefBranch.getIntPref("sessionstore.max_tab_back_history");
var startIndex = -1 < cap && cap < history.index ? history.index - cap : 0;
for (var j = startIndex; j < history.count; j++)
tabData.entries.push(this._serializeHistoryEntry(history.getEntryAtIndex(j, false), tabData.entries.push(this._serializeHistoryEntry(history.getEntryAtIndex(j, false),
aFullData)); aFullData));
tabData.index = history.index - startIndex + 1; tabData.index = history.index + 1;
// make sure not to cache privacy sensitive data which shouldn't get out // make sure not to cache privacy sensitive data which shouldn't get out
if (!aFullData) if (!aFullData)