rem: function tryToSetContentWindow() { var startpage = startPageDefault; if ( window.content ) { dump("Setting content window\n"); appCore.setContentWindow( window.content );  
add: function tryToSetContentWindow() { var startpage = startPageDefault; if ( window.content ) { appCore.setContentWindow( window.content ); 
context:   function tryToSetContentWindow() {    var startpage = startPageDefault;    if ( window.content ) {        dump("Setting content window\n");        appCore.setContentWindow( window.content );        // Have browser app core load appropriate initial page.        if ( !explicitURL ) {            // if all else fails, use trusty "about:blank" as the start page            if (pref) {              // from mozilla/modules/libpref/src/init/all.js              // 0 = blank               // 1 = home (browser.startup.homepage)              // 2 = last 		choice = 1;		try {              		choice = pref.GetIntPref("browser.startup.page");		}		catch (ex) {			dump("failed to get the browser.startup.page pref\n");		}		dump("browser.startup.page = " + choice + "\n");    	  switch (choice) {    		case 0:                		startpage = "about:blank";          			break;    		case 1:				try {                			startpage = pref.CopyCharPref("browser.startup.homepage");				}				catch (ex) {					dump("failed to get the homepage!\n");					startpage = startPageDefault;				}          			break;    		case 2:                		var history = Components.classes['component://netscape/browser/global-history'];    			if (history) {                   			history = history.getService();    	    		}    	    		if (history) {                  			history = history.QueryInterface(Components.interfaces.nsIGlobalHistory);    	    		}    	    		if (history) {    				startpage = history.GetLastPageVisted();    	    		}          			break;       		default:                		startpage = startPageDefault;    	  }            }            else {		dump("failed to QI pref service\n");	    }	    dump("startpage = " + startpage + "\n");          var args = document.getElementById("args")            if (args) args.setAttribute("value", startpage);        }        appCore.loadInitialPage();    } else {        // Try again.        dump("Scheduling later attempt to set content window\n");        window.setTimeout( "tryToSetContentWindow()", 100 );    }  }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/504dbe197757dfd7174946e37fd3dbb61e55759e/navigator.js/buggy/suite/browser/navigator.js