context:   startSearch: function(searchString, searchParam, previousResult, listener) {    var searchService = Cc["@mozilla.org/browser/search-service;1"].                        getService(Ci.nsIBrowserSearchService);    // If there's an existing request, stop it. There is no smart filtering    // here as there is when looking through history/form data because the    // result set returned by the server is different for every typed value -    // "ocean breathes" does not return a subset of the results returned for    // "ocean", for example. This does nothing if there is no current request.    this.stopSearch();    this._listener = listener;    var engine = searchService.currentEngine;    this._checkForEngineSwitch(engine);    if (!searchString ||        !engine.supportsResponseType(SEARCH_RESPONSE_SUGGESTION_JSON) ||        !this._okToRequest()) {      // We have an empty search string (user pressed down arrow to see      // history), or the current engine has no suggest functionality,      // or we're in backoff mode; so just use local history.      this._sentSuggestRequest = false;      this._startHistorySearch(searchString, searchParam, previousResult);      return;    }    // Actually do the search    this._request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].                    createInstance(Ci.nsIXMLHttpRequest);    var submission = engine.getSubmission(searchString,                                          SEARCH_RESPONSE_SUGGESTION_JSON);    this._suggestURI = submission.uri;    var method = (submission.postData ? "POST" : "GET");    this._request.open(method, this._suggestURI.spec, true);    var self = this;    function onReadyStateChange() {      self.onReadyStateChange();    }    this._request.onreadystatechange = onReadyStateChange;    this._request.send(submission.postData);    if (this._includeFormHistory) {      this._sentSuggestRequest = true;      this._startHistorySearch(searchString, searchParam, previousResult);    }  },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/31a937d5df39cb950d98c08ffb58fdc4f4355536/nsSearchSuggestions.js/buggy/browser/components/search/nsSearchSuggestions.js