Closed
Bug 606886
Opened 14 years ago
Closed 4 years ago
don't notify about added engines until we're done adding them
Categories
(Firefox :: Search, defect, P3)
Firefox
Search
Tracking
()
RESOLVED
FIXED
Iteration:
79.1 - June 1 - June 14
People
(Reporter: Gavin, Unassigned)
References
Details
(Whiteboard: [fixed by bug 1630050])
The current tests in browser/components/search/test/ throw these errors:
TEST-INFO | chrome://mochitests/content/browser/browser/components/search/test/browser_415700.js | Console message: [JavaScript Error: "[Exception... "Can't find engine in store!" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: jar:file:///home/cltbld/talos-slave/mozilla-central_fedora64_test-mochitest-other/build/firefox/omni.jar!/components/nsSearchService.js :: FAIL :: line 241" data: no]" {file: "jar:file:///home/cltbld/talos-slave/mozilla-central_fedora64_test-mochitest-other/build/firefox/omni.jar!/components/nsSearchService.js" line: 241}]
This is because _addEngineToStore notifies about the added engine, and the test code removes an the engine as soon as it gets that notification. The SEARCH_ENGINE_LOADED code attempts to select the engine as current immediately after calling addEngineToStore, and throws because the engine has since been removed.
Proposed solution: move the notification out of addEngineToStore and into the callers, and have them only do it once they're done doing things that require aEngine to exist.
Reporter | ||
Comment 1•14 years ago
|
||
Related issue: we're notifying engine-changed due to icon changes while in the progress of initializing the engine object, which is lame. We shouldn't notify for engine changes until the engine has been added to the store, IMO.
Reporter | ||
Comment 2•14 years ago
|
||
(In reply to comment #1)
> Related issue: we're notifying engine-changed due to icon changes while in the
> progress of initializing the engine object, which is lame. We shouldn't notify
> for engine changes until the engine has been added to the store, IMO.
Change of plan - doing this means that we'll end up notifying about the currentEngine change before notifying about the engine addition change, which doesn't really make sense. Instead, let's just ignore the error setting currentEngine.
Updated•5 years ago
|
Priority: -- → P3
Updated•5 years ago
|
Comment 3•4 years ago
|
||
Bug 1630050 ended up fixing this.
Status: NEW → RESOLVED
Iteration: --- → 79.1 - June 1 - June 14
Points: 3 → ---
Closed: 4 years ago
Depends on: 1630050
Resolution: --- → FIXED
Whiteboard: [fixed by bug 1630050]
You need to log in
before you can comment on or make changes to this bug.
Description
•