зеркало из https://github.com/mozilla/gecko-dev.git
Back out delayedInit, it's a race problem waiting to happen. Keeping some of the goodness of that patch though, like setting session history before hooking up the progress listener. sr=hyatt
This commit is contained in:
Родитель
fb90ea7686
Коммит
c4169f4926
|
@ -428,29 +428,9 @@ function Startup()
|
|||
gNavigatorRegionBundle = document.getElementById("bundle_navigator_region");
|
||||
gBrandRegionBundle = document.getElementById("bundle_brand_region");
|
||||
|
||||
gBrowser = document.getElementById("content");
|
||||
gURLBar = document.getElementById("urlbar");
|
||||
|
||||
// Do all UI building here:
|
||||
|
||||
setOfflineStatus();
|
||||
|
||||
// set home button tooltip text
|
||||
var homePage = getHomePage();
|
||||
if (homePage)
|
||||
document.getElementById("home-button").setAttribute("tooltiptext", homePage);
|
||||
|
||||
try {
|
||||
var searchMode = pref.GetIntPref("browser.search.mode");
|
||||
setBrowserSearchMode(searchMode);
|
||||
} catch (ex) {
|
||||
}
|
||||
|
||||
// call rest of init on timer so the window shows early
|
||||
setTimeout(delayedInit, 0);
|
||||
}
|
||||
|
||||
function delayedInit()
|
||||
{
|
||||
var webNavigation;
|
||||
try {
|
||||
// Create the browser instance component.
|
||||
|
@ -468,6 +448,21 @@ function delayedInit()
|
|||
return;
|
||||
}
|
||||
|
||||
// Do all UI building here:
|
||||
|
||||
setOfflineStatus();
|
||||
|
||||
// set home button tooltip text
|
||||
var homePage = getHomePage();
|
||||
if (homePage)
|
||||
document.getElementById("home-button").setAttribute("tooltiptext", homePage);
|
||||
|
||||
try {
|
||||
var searchMode = pref.GetIntPref("browser.search.mode");
|
||||
setBrowserSearchMode(searchMode);
|
||||
} catch (ex) {
|
||||
}
|
||||
|
||||
// initialize observers and listeners
|
||||
window.XULBrowserWindow = new nsXULBrowserWindow();
|
||||
window.buttonPrefListener = new nsButtonPrefListener();
|
||||
|
|
Загрузка…
Ссылка в новой задаче