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

VERIFIED DUPLICATE of bug 508102

Status

()

--
minor
VERIFIED DUPLICATE of bug 508102
10 years ago
10 years ago

People

(Reporter: stubenschrott, Unassigned)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
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
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 508102
V.Duplicate
Status: RESOLVED → VERIFIED
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.