зеркало из https://github.com/mozilla/pjs.git
bug 404222: remove unnecessary calls to getBrowserIndexForDocument to improve performance; r=sayrer, a=schrep
This commit is contained in:
Родитель
f2c15c4481
Коммит
f5097ca64e
|
@ -128,17 +128,6 @@ function pageShowEventHandlers(event)
|
|||
|
||||
XULBrowserWindow.asyncUpdateUI();
|
||||
}
|
||||
|
||||
// some event handlers want to be told what the original browser/listener is
|
||||
var targetBrowser = null;
|
||||
if (gBrowser.mTabbedMode) {
|
||||
var targetBrowserIndex = gBrowser.getBrowserIndexForDocument(event.originalTarget);
|
||||
if (targetBrowserIndex == -1)
|
||||
return;
|
||||
targetBrowser = gBrowser.getBrowserAtIndex(targetBrowserIndex);
|
||||
} else {
|
||||
targetBrowser = gBrowser.mCurrentBrowser;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -998,8 +987,6 @@ function prepareForStartup()
|
|||
|
||||
// setup our common DOMLinkAdded listener
|
||||
gBrowser.addEventListener("DOMLinkAdded", DOMLinkHandler, false);
|
||||
|
||||
gBrowser.addEventListener("pagehide", FeedHandler.onPageHide, false);
|
||||
}
|
||||
|
||||
function delayedStartup()
|
||||
|
@ -5295,12 +5282,6 @@ function convertFromUnicode(charset, str)
|
|||
* and shows UI when they are discovered.
|
||||
*/
|
||||
var FeedHandler = {
|
||||
onPageHide: function(event) {
|
||||
var theBrowser = gBrowser.getBrowserForDocument(event.target);
|
||||
if (theBrowser)
|
||||
theBrowser.feeds = null;
|
||||
},
|
||||
|
||||
/**
|
||||
* The click handler for the Feed icon in the location bar. Opens the
|
||||
* subscription page if user is not given a choice of feeds.
|
||||
|
|
|
@ -455,6 +455,8 @@
|
|||
this.pageReport = null;
|
||||
this.updatePageReport();
|
||||
}
|
||||
if (this.feeds)
|
||||
this.feeds = null;
|
||||
if (!this.docShell || !this.fastFind)
|
||||
return;
|
||||
var tabBrowser = this.getTabBrowser();
|
||||
|
|
Загрузка…
Ссылка в новой задаче