Bug 1240164 - Avoid caching tab dimensions in taskbar preview init code. Improves sessionrestore by about 1.5%. r=Dao

This commit is contained in:
Jim Mathies 2016-01-19 16:37:58 -06:00
parent cdc25e9077
commit 6597b63ae6

View File

@ -371,8 +371,6 @@ function TabWindow(win) {
this.win = win;
this.tabbrowser = win.gBrowser;
this.cacheDims();
this.previews = new Map();
for (let i = 0; i < this.tabEvents.length; i++)
@ -394,6 +392,8 @@ function TabWindow(win) {
TabWindow.prototype = {
_enabled: false,
_cachedWidth: 0,
_cachedHeight: 0,
tabEvents: ["TabOpen", "TabClose", "TabSelect", "TabMove"],
winEvents: ["resize"],
@ -404,8 +404,8 @@ TabWindow.prototype = {
this.tabbrowser.removeTabsProgressListener(this);
for (let i = 0; i < this.winEvents.length; i++)
this.win.removeEventListener(this.winEvents[i], this, false);
for (let i = 0; i < this.winEvents.length; i++)
this.win.removeEventListener(this.winEvents[i], this, false);
for (let i = 0; i < this.tabEvents.length; i++)
this.tabbrowser.tabContainer.removeEventListener(this.tabEvents[i], this, false);