rem:  setTimeout(delayedInit, 0); 
add:  window.XULBrowserWindow = new nsXULBrowserWindow(); window.buttonPrefListener = new nsButtonPrefListener();   _content.appCore = appCore;   appCore.setWebShellWindow(window);     var contentArea = document.getElementById("appcontent"); contentArea.addEventListener("load", loadEventHandlers, true); contentArea.addEventListener("focus", contentAreaFrameFocus, true);   if ("arguments" in window && window.arguments.length > 1 && window.arguments[1]) { if (window.arguments[1].indexOf("charset=") != -1) { var arrayArgComponents = window.arguments[1].split("="); if (arrayArgComponents) {  appCore.setDefaultCharacterSet(arrayArgComponents[1]); } } }     webNavigation.sessionHistory = Components.classes["@mozilla.org/browser/shistory;1"] .createInstance(Components.interfaces.nsISHistory);   var interfaceRequestor = getBrowser().docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor); var webProgress = interfaceRequestor.getInterface(Components.interfaces.nsIWebProgress); webProgress.addProgressListener(appCore);   getBrowser().boxObject.setPropertyAsSupports("listenerkungfu", appCore);   var isPageCycling = false;   if (!appCore.cmdLineURLUsed) isPageCycling = appCore.startPageCycler();   if (!isPageCycling) { var startPage;  if (!appCore.cmdLineURLUsed) { var cmdLineService = Components.classes["@mozilla.org/appshell/commandLineService;1"] .getService(Components.interfaces.nsICmdLineService); startPage = cmdLineService.URLToLoad; if (!startPage) { var cmdLineHandler = Components.classes["@mozilla.org/commandlinehandler/general-startup;1?type=browser"] .getService(Components.interfaces.nsICmdLineHandler); startPage = cmdLineHandler.defaultArgs; } appCore.cmdLineURLUsed = true; }  if (!startPage) {  if ("arguments" in window && window.arguments.length >= 1 && window.arguments[0]) startPage = window.arguments[0]; }  if (startPage && startPage != "about:blank") loadURI(startPage);   if ("arguments" in window && window.arguments.length >= 3 && window.arguments[2] == true) _content.focus(); else gURLBar.focus();   checkForDefaultBrowser(); } 
context: function Startup(){  // init globals  gNavigatorBundle = document.getElementById("bundle_navigator");  gBrandBundle = document.getElementById("bundle_brand");  gNavigatorRegionBundle = document.getElementById("bundle_navigator_region");  gBrandRegionBundle = document.getElementById("bundle_brand_region");  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);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c7ee656ba6c7c4a20e4dd3fbabfe302c80239442/navigator.js/buggy/suite/browser/navigator.js