Closed Bug 510589 Opened 15 years ago Closed 15 years ago

nsIAutoCompleteSearch::stopSearch() throws an error when called before startSearch().

Categories

(Firefox :: Bookmarks & History, defect)

x86_64
Linux
defect
Not set
minor

Tracking

()

VERIFIED DUPLICATE of bug 508102

People

(Reporter: stubenschrott, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2a2pre) Gecko/20090814 Minefield/3.6a2pre
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2a2pre) Gecko/20090814 Minefield/3.6a2pre

When updating my extension (vimperator.org) to also work with Firefox3.6a2pre i noticed, that my old code did not work anymore. The caveat was, that nsIAutoCompleteSearch::stopSearch() throws an error now, if i did not .startSearch() before. It worked fine in Firefox3.5 and certainly should be according to the documentation: https://developer.mozilla.org/en/nsIAutoCompleteSearch#stopSearch.28.29

"Stop all searches that are in progress." -> if I don't do a "startSearch" no search is in progress -> stopSearch should stop 0 searches (but not throw an error).

Reproducible: Always

Steps to Reproduce:
var search = Cc["@mozilla.org/autocompletesearch;1?name=history"].createInstance();
search.QueryInterface(Ci.nsIAutoCompleteSearch)
search.stopSearch()

Actual Results:  
Error: uncaught exception: [Exception... "'[JavaScript Error:
"this._pendingQuery is undefined" {file: "file:///home/maxauthority/files/fir
efox36/firefox/components/nsPlacesAutoComplete.js" line: 635}]' when calling
method: [nsIAutoCompleteSearch::stopSearch]"  nsresult: "0x80570021
(NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame ::
chrome://liberator/content/config.js ::

Expected Results:  
awesomebar completions :)
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
V.Duplicate
Status: RESOLVED → VERIFIED
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.