Closed Bug 598630 Opened 15 years ago Closed 7 years ago

Need searchservice.reload()

Categories

(Firefox :: Search, defect, P5)

Other
All
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: BenB, Unassigned)

Details

(Whiteboard: [fxsearch])

See bug 598623. As a workaround for this, and other situations, it would be necessary to let the search service read newly added OSD files in the searchplugins/ directories. I.e. instead of requiring a restart, let the just search service do the init/load stuff again. There is an interal _loadEngines() function, but it's not exposed, and only called from the search service's ctor. All I need is a refresh() function in nsIBrowserSearchService that's calling _loadEngines() (in nsSearchService.js). Ideally, it would also remove engines that are no longer in the dirs, and update those that were changed, but that's optional. What I currently mostly need is adding engines. Either way, existing nsISearchEngine instances should stay valid and the "engine-*" messages should only be called fore added/removed/updated engines, for fear of breaking other code.
FWIW, we (web.de/GMX) need either this or bug 598623 fixed for FF4. The latter is unlikely to be fixed, and this one would be easy. An alternative hack would be to allow .wrappedJSObject for the search service. Then we could call the internal function. Not pretty, but maybe something as short-term solution for FF4.
The workaround we use for tests is: function asyncReInit() { let promise = waitForSearchNotification("reinit-complete"); Services.search.QueryInterface(Ci.nsIObserver) .observe(null, "nsPref:changed", "general.useragent.locale"); return promise; } Note: engines in the <app>/searchplugins directory are no longer supported since bug 1162569, and engines in <profile>/searchplugins/ won't be read after bug 1203167 is fixed.
Priority: -- → P5
Whiteboard: [fxsearch]
Rank: 59

This appears to be mainly a request for an add-on interface for when we supported the old style add-ons. Since we no longer support those and we don't need this internally, I'm closing this as wontfix.

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