rem: if ("arguments" in window && window.arguments[2] == true) 
add: if ("arguments" in window && window.arguments.length >= 3 && window.arguments[2] == true) 
context: function Startup(){  gNavigatorBundle = document.getElementById("bundle_navigator");  gBrandBundle = document.getElementById("bundle_brand");  gNavigatorRegionBundle = document.getElementById("bundle_navigator_region");  gBrandRegionBundle = document.getElementById("bundle_brand_region");  window.XULBrowserWindow = new nsXULBrowserWindow();  window.buttonPrefListener = new nsButtonPrefListener();  var webNavigation;  try {    // Create the browser instance component.    appCore = Components.classes["@mozilla.org/appshell/component/browser/instance;1"]                        .createInstance(Components.interfaces.nsIBrowserInstance);    if (!appCore)      throw Components.results.NS_ERROR_FAILURE;    webNavigation = getWebNavigation();    if (!webNavigation)      throw Components.results.NS_ERROR_FAILURE;  } catch (e) {    alert("Error creating browser instance");    window.close(); // Give up.    return;  }  _content.appCore = appCore;  // Initialize browser instance..  appCore.setWebShellWindow(window);  gURLBar = document.getElementById("urlbar");     // set the offline/online mode  setOfflineStatus();  // Add a capturing event listener to the content area  // (rjc note: not the entire window, otherwise we'll get sidebar pane loads too!)  //  so we'll be notified when onloads complete.  var contentArea = document.getElementById("appcontent");  contentArea.addEventListener("load", loadEventHandlers, true);  contentArea.addEventListener("focus", contentAreaFrameFocus, true);  // set default character set if provided  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) {        //we should "inherit" the charset menu setting in a new window        BrowserSetDefaultCharacterSet(arrayArgComponents[1]);      }    }  }  try {    var searchMode = pref.GetIntPref("browser.search.mode");    setBrowserSearchMode(searchMode);  } catch (ex) {  }  // set home button tooltip text  var homePage = getHomePage();  if (homePage)    document.getElementById("home-button").setAttribute("tooltiptext", homePage);  //initConsoleListener();  // load appropriate initial page from commandline  var isPageCycling = false;  // page cycling for tinderbox tests  if (!appCore.cmdLineURLUsed)    isPageCycling = appCore.startPageCycler();  // only load url passed in when we're not page cycling  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) {      // Check for window.arguments[0]. If present, use that for startPage.      if ("arguments" in window && window.arguments.length >= 1 && window.arguments[0])        startPage = window.arguments[0];    }    if (startPage)      loadURI(startPage);               // Focus the content area if the caller instructed us to.    if ("arguments" in window && window.arguments[2] == true)      _content.focus();    else      gURLBar.focus();         // Perform default browser checking.    checkForDefaultBrowser();  }}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/be365c8ed9414b97942f68ec04c8768c69f09152/navigator.js/buggy/xpfe/browser/resources/content/navigator.js