Closed Bug 1645511 Opened 5 years ago Closed

Improve the provider manager's provider.updateBehavior calls

Categories

(Firefox :: Address Bar, defect, P3)

defect
Points:
1

Tracking

()

RESOLVED FIXED
Firefox 79
Iteration:
79.2 - June 15 - June 28
Tracking Status
firefox79 --- fixed

People

(Reporter: adw, Assigned: adw)

Details

Attachments

(1 file)

The provider manager calls provider.updateBehavior here: https://searchfox.org/mozilla-central/rev/0e09b9191c02097034e46b193930f91c45b7885d/browser/components/urlbar/UrlbarProvidersManager.jsm#201

Marco and I noticed that the manager should check query.canceled after the await because the query may be quickly canceled while the manager is calling the providers.

Also, I'd like to not await each provider in turn but instead await a Promise.all so that the providers run concurrently. We made a similar change to the manager's isActive and startQuery calls when I implemented form history.

I considered wrapping provider.tryMethod("updateBehavior", queryContext) in a
promise in case there are implementations that aren't async or don't return a
promise. But there's only one implementation of updateBehavior, it's async,
and we probably won't end up with any more implementations, so for simplicity I
didn't.

Points: 2 → 1
Iteration: 79.1 - June 1 - June 14 → 79.2 - June 15 - June 28
Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b49ea5f44be0 Improve the provider manager's provider.updateBehavior calls. r=mak
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 79
Flags: qe-verify-
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: