context:   function MiniNavStartup(){  var homepage = "http://www.mozilla.org";    try {        gBrowser = document.getElementById("content");        gURLBar = document.getElementById("urlbar");    gURLBar.setAttribute("completedefaultindex", "true");        var currentTab=gBrowser.selectedTab;    browserInit(currentTab);    gSelectedTab=currentTab;        gBrowserStatusHandler = new nsBrowserStatusHandler();    gBrowserStatusHandler.init();        window.XULBrowserWindow = gBrowserStatusHandler;    window.QueryInterface(nsCI.nsIInterfaceRequestor)      .getInterface(nsIWebNavigation)      .QueryInterface(nsCI.nsIDocShellTreeItem).treeOwner      .QueryInterface(nsCI.nsIInterfaceRequestor)      .getInterface(nsCI.nsIXULWindow)      .XULBrowserWindow = window.XULBrowserWindow;        gBrowser.addProgressListener(gBrowserStatusHandler, nsCI.nsIWebProgress.NOTIFY_ALL);            window.browserDOMWindow = new nsBrowserAccess(gBrowser);        // Current build was not able to get it. Taking it from the tab browser element.     // var webNavigation=gBrowser.webNavigation;        var refBrowser=gBrowser.getBrowserForTab(currentTab);    var webNavigation=refBrowser.webNavigation;        webNavigation.sessionHistory = Components.classes["@mozilla.org/browser/shistory;1"].createInstance(nsCI.nsISHistory);        gBrowser.docShell.QueryInterface(nsCI.nsIDocShellHistory).useGlobalHistory = true;        gGlobalHistory = Components.classes["@mozilla.org/browser/global-history;2"]      .getService(nsCI.nsIBrowserHistory);        gURIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"]      .getService(nsCI.nsIURIFixup);        var bookmarkstore=null;         try {      gPref = Components.classes["@mozilla.org/preferences-service;1"]        .getService(nsCI.nsIPrefBranch);            var page = gPref.getCharPref("browser.startup.homepage");      var bookmarkstore = gPref.getCharPref("browser.bookmark.store");            if (page != null)      {        var fixedUpURI = gURIFixup.createFixupURI(page, 2 /*fixup url*/ );        homepage = fixedUpURI.spec;      }    } catch (ignore) {}      } catch (e) {    alert("Error trying to startup browser.  Please report this as a bug:\n" + e);  }    loadURI(homepage);  loadBookmarks(bookmarkstore);    /*   * Override the title attribute <title /> in this doc with a setter.   * This is our workaround solution so that when the tabbrowser::updateTitle   * tries to update this document's title, nothing happens. Bug 311564   */     document.__defineSetter__("title",function(x){}); // Stays with the titled defined by the XUL element.       gBrowser.addEventListener("DOMLinkAdded", BrowserLinkAdded, false);  }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/ce37805370052ef3f60f79cda5e6beffc61664e2/minimo.js/buggy/minimo/chrome/content/minimo.js