Closed Bug 1683888 Opened 4 years ago Closed 4 years ago

Overriding of search engines should be completed before SearchService.init finishes

Categories

(Firefox :: Search, defect, P2)

defect
Points:
5

Tracking

()

RESOLVED WONTFIX

People

(Reporter: standard8, Unassigned)

References

(Blocks 1 open bug)

Details

From looking at telemetry I noticed a couple of issues with the overriding of search engines:

  • The environment telemetry has the wrong submission URL if Firefox has been restarted after installing the add-on.
  • If the user uses a --search command line option to start Firefox (or I guess calling from an external app), then the search will have the parameters of the normal engine rather than the overridden engines.

The main issue here is that rather than handling the overrides as part of initialisation, we wait until initialisation is complete, and then handle them. As we've waited, there's a short time where other things like the above can get in, and get the wrong parameters/details.

Bug 1683860 would help the telemetry side, although it may cause two environment pings to happen.

I think we should investigate moving the handling of the override to happen at the end of the initialisation sequence, it might be that we need an "init completed enough for add-on manager interactions" state.

Having thought about this a bit, I think it would be hard to do. The issue is that the add-on manager needs the search service to have started and the search service needs the add-on manager to complete starting its extensions. We could probably do this with a two-tier initialisation system on the search service side, but I think that would be too complex to be worth the gain.

Additionally, the concerns I had with bug 1683860 are not significant, as telemetry has its own throttling mechanism for quick updates.

Hence I think I'm going to wontfix this.

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