Bug 1964677 - Make UrlbarProvider.isActive consistently async for inheritance consistency. r=urlbar-reviewers,jteow

Differential Revision: https://phabricator.services.mozilla.com/D247923
This commit is contained in:
Mark Banner
2025-05-15 10:27:20 +00:00
committed by mbanner@mozilla.com
parent 37925b7ca4
commit 46ce829d46
41 changed files with 77 additions and 92 deletions

View File

@@ -2579,11 +2579,15 @@ export class UrlbarProvider {
* If this method returns false, the providers manager won't start a query
* with this provider, to save on resources.
*
* @param {UrlbarQueryContext} _queryContext The query context object
* @returns {boolean} Whether this provider should be invoked for the search.
* @param {UrlbarQueryContext} _queryContext
* The query context object
* @param {UrlbarController} _controller
* The current controller.
* @returns {Promise<boolean>}
* Whether this provider should be invoked for the search.
* @abstract
*/
isActive(_queryContext) {
async isActive(_queryContext, _controller) {
throw new Error("Trying to access the base class, must be overridden");
}