Closed Bug 762958 Opened 13 years ago Closed 6 years ago

Exception... "Can't find engine in store!" in tests browser_483086.js, browser_addEngine.js

Categories

(Firefox :: Search, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: Yoric, Unassigned)

Details

Reading the logs of tests browser_483086.js and browser_addEngine.js shows the following (caught and logged) exception, repeated several times: TEST-INFO | chrome://mochitests/content/browser/browser/components/search/test/browser_483086.js | Console message: [JavaScript Error: "[Exception... "Can't find engine in store!" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: file:///Users/david/Documents/Code/mozilla-central-promises/obj-x86_64-apple-darwin11.4.0/dist/Nightly.app/Contents/MacOS/components/nsSearchService.js :: FAIL :: line 247" data: no]" {file: "file:///Users/david/Documents/Code/mozilla-central-promises/obj-x86_64-apple-darwin11.4.0/dist/Nightly.app/Contents/MacOS/components/nsSearchService.js" line: 247}] Upon investigation, the situation seems to be the following: - test adds search engine; - service fires "engine-added" then backgrounds actual loading of the engine; - upon "engine-added", test removes engine; - service removes engine; - once engine is loaded, service attempts to set it as current engine; - as engine has been removed, service raises exception; - service catches exception. While this is hardly fatal, the existence of this race condition is a bit worrying.
(In reply to David Rajchenbach Teller [:Yoric] from comment #0) > Upon investigation, the situation seems to be the following: > - test adds search engine; > - service fires "engine-added" then backgrounds actual loading of the engine; Are you sure? This should be impossible - _addEngineToStore (which fires the "added" notification) should only be called once the load is complete.

I just ran both of these tests on latest mozilla-central and neither of them generate the error any more.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.