зеркало из https://github.com/mozilla/pjs.git
Bug 398807 ? session restore accounts for 2-3% of talos pageload (make it faster) (r=zeniko)
This commit is contained in:
Родитель
ff3f583e78
Коммит
d758822f22
|
@ -582,6 +582,8 @@ pref("browser.sessionstore.postdata", 0);
|
|||
pref("browser.sessionstore.privacy_level", 1);
|
||||
// how many tabs can be reopened (per window)
|
||||
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
|
||||
pref("accessibility.blockautorefresh", false);
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Dietrich Ayala <autonome@gmail.com>
|
||||
* Dietrich Ayala <dietrich@mozilla.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -828,10 +828,15 @@ SessionStoreService.prototype = {
|
|||
tabData.index = history.index + 1;
|
||||
}
|
||||
else if (history && history.count > 0) {
|
||||
for (var j = 0; j < history.count; j++)
|
||||
// Cap the number of back history entries saved. (-1 = no cap)
|
||||
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.index = history.index + 1;
|
||||
|
||||
|
||||
tabData.index = history.index - startIndex + 1;
|
||||
|
||||
browser.parentNode.__SS_data = tabData;
|
||||
}
|
||||
else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче