rem: SetPageProxyState("invalid"); 
add: SetPageProxyState("invalid", null); 
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");  gBrowser = document.getElementById("content");  gURLBar = document.getElementById("urlbar");    SetPageProxyState("invalid");  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 "couldn't create a browser instance";    // Get the preferences service    var prefService = Components.classes["@mozilla.org/preferences-service;1"]                                .getService(Components.interfaces.nsIPrefService);    pref = prefService.getBranch(null);    webNavigation = getWebNavigation();    if (!webNavigation)      throw "no XBL binding for browser";  } catch (e) {    alert("Error launching browser window:" + e);    window.close(); // Give up.    return;  }  // Do all UI building here:  // set home button tooltip text  var homePage = getHomePage();  if (homePage)    document.getElementById("home-button").setAttribute("tooltiptext", homePage);  // initialize observers and listeners  window.XULBrowserWindow = new nsBrowserStatusHandler();  window.buttonPrefListener = new nsButtonPrefListener();  window.browserContentListener =    new nsBrowserContentListener(window, getBrowser());    // XXXjag hack for directory.xul/js  _content.appCore = appCore;  // Initialize browser instance..  appCore.setWebShellWindow(window);  // 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);  var turboMode = false;  // 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        appCore.setDefaultCharacterSet(arrayArgComponents[1]); //XXXjag see bug 67442      }    } else if (window.arguments[1].indexOf("turbo=yes") != -1) {        turboMode = true;    }  }  //initConsoleListener();  // wire up session history before any possible progress notifications for back/forward button updating  webNavigation.sessionHistory = Components.classes["@mozilla.org/browser/shistory;1"]                                           .createInstance(Components.interfaces.nsISHistory);  // hook up UI through progress listener  getBrowser().addProgressListener(window.XULBrowserWindow);  // XXXjag see bug 68662 (needed to hook up web progress listener)  getBrowser().boxObject.setPropertyAsSupports("listenerkungfu", window.XULBrowserWindow);  // 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 uriToLoad;    // Check for window.arguments[0]. If present, use that for uriToLoad.    if ("arguments" in window && window.arguments.length >= 1 && window.arguments[0])      uriToLoad = window.arguments[0];        if (uriToLoad && uriToLoad != "about:blank") {      gURLBar.value = uriToLoad;      loadURI(uriToLoad);    }    // Close the window now, if it's for turbo mode startup.    if ( turboMode ) {        // Set "command line used" flag.  If we don't do this, then when a cmd line url        // for a "real* invocation comes in, we will override it with the "cmd line url"        // from the turbo-mode process (i.e., the home page).        appCore.cmdLineURLUsed = true;        // For some reason, window.close() directly doesn't work, so do it in the future.        window.setTimeout( "window.close()", 100 );        return;    }    // Focus the content area if the caller instructed us to.    if ("arguments" in window && window.arguments.length >= 3 && window.arguments[2] == true ||        !window.locationbar.visible)      setTimeout(WindowFocusTimerCallback, 0, _content);    else      setTimeout(WindowFocusTimerCallback, 0, gURLBar);    // Perform default browser checking.    checkForDefaultBrowser();    // hook up remote support    if (XREMOTESERVICE_CONTRACTID in Components.classes) {      var remoteService;      remoteService = Components.classes[XREMOTESERVICE_CONTRACTID]                                .getService(Components.interfaces.nsIXRemoteService);      remoteService.addBrowserInstance(window);    }  }  // now load bookmarks after a delay  setTimeout(LoadBookmarksCallback, 100);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/64a1fd2289f7d3594ba60abd6f2f667e27c0bd06/navigator.js/clean/xpfe/browser/resources/content/navigator.js