Improve the provider manager's provider.updateBehavior calls
Categories
(Firefox :: Address Bar, defect, P3)
Tracking
()
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.
Assignee | ||
Comment 1•5 years ago
|
||
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.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Comment 4•5 years ago
|
||
bugherder |
Comment 5•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Description
•