rem:  try { var	searchURL = searchDS.GetInternetSearchURL( searchEngineURI, escapedSearchStr ); } catch(ex) { searchURL = ""; } 
add: if (!searchEngineURI) searchEngineURI = searchBundle.getString("defaultSearchURL"); 
context: function OpenSearch( aSearchStr, engineURIs ){  var searchEngineURI = nsPreferences.copyUnicharPref("browser.search.defaultengine", null);  var autoOpenSearchPanel = nsPreferences.getBoolPref("browser.search.opensidebarsearchpanel", false);  var defaultSearchURL = nsPreferences.getLocalizedUnicharPref("browser.search.defaulturl", null);	if (!defaultSearchURL)		defaultSearchURL = bundle.GetStringFromName("defaultSearchURL");  var searchDS = Components.classes[ISEARCH_CONTRACTID].getService(nsIInternetSearchService);  if (searchDS)  {    if(!aSearchStr)      return(false);    var	escapedSearchStr = escape( aSearchStr );    searchDS.RememberLastSearchText( escapedSearchStr );		try {      if( !engineURIs || ( engineURIs && engineURIs.length <= 1 ) )      {        // not called from sidebar or only one engine selected        if (engineURIs && engineURIs.length == 1) {          debug("Got one engine: " + engineURIs[0] + "\n");          searchEngineURI = engineURIs[0];          gURL = "internetsearch:engine=" + searchEngineURI + "&text=" + escapedSearchStr;        }              if (!searchEngineURI)          searchEngineURI = bundle.GetStringFromName("defaultSearchURL");        // look up the correct search URL format for the given engine    		try {    			var	searchURL = searchDS.GetInternetSearchURL( searchEngineURI, escapedSearchStr );    		}    		catch(ex) {    			searchURL = "";    		}        defaultSearchURL = searchURL ? searchURL : defaultSearchURL + escapedSearchStr;        if (!searchURL) gURL = "";        // load the results page of selected or default engine in the content area        if (defaultSearchURL)          loadURLInContent(defaultSearchURL);      }      else {        // multiple providers        searchURL = "";        for( var i = 0; i < engineURIs.length; i++ ) {          searchURL += !searchURL ? "internetsearch:" : "&";          searchURL += "engine=" + engineURIs[i];        }        searchURL += ( "&text=" + escapedSearchStr );        gURL = searchURL;        dump("*** about to attempt to load internetresults into the content window\n");        loadURLInContent("chrome://communicator/content/search/internetresults.xul?" + escape(searchURL));      }		}		catch(ex)		{		}    setTimeout("checkSearchProgress()", 1000);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c837d8cd69e2d1c5d2619fe01ec4c3979b2e5f7e/search-panel.js/buggy/suite/common/search/search-panel.js