Open Bug 1587876 Opened 5 years ago Updated 6 months ago

[meta] Adapt WebExtensions APIs to support suspendible extension contexts


(WebExtensions :: Frontend, task)



(Not tracked)


(Reporter: rpl, Unassigned)


(Depends on 4 open bugs, Blocks 2 open bugs)


(Keywords: meta)

Under this meta issue are going to be grouped the sub-tasks needed to adapt the existing WebExtensions APIs to extension contexts that can be "suspended" while the extension is enabled (like the manifest v3 background service worker, or the manifest v2 non-persistent background page, known on chrome as "event page").

As an example of the kind of work needed on the existing APIs, the menus/contextMenus API would need at least the following changes:

  • in the menus.create API method, which takes an id parameter, this parameter is currently optional, but it should be mandatory for suspendible extension contexts (as it is what makes the API able to recognize when a certain menu item was already created before the extension context is being suspended and then wake up in response of a received event).

  • the menus API events should be persisted and replaced with "primed listeners" when the extension context has been suspended (so that the "primed listener" will be able to receive the events while the extension context is gone, and then wake up the context and fire the pending events received in the meantime).

Depends on: 1587879
Depends on: 1587880
Depends on: 1587883
Summary: [meta] Adapt WebExtensions APIs to support suspendable extension contexts → [meta] Adapt WebExtensions APIs to support suspendible extension contexts
Depends on: 1454406

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: General → Frontend
Depends on: 1748538
Depends on: 1748546
Depends on: 1748547
Depends on: 1748548
Depends on: 1748549
Depends on: 1748550
Depends on: 1748551
Depends on: 1748552
Depends on: 1748553
Depends on: 1748554
Depends on: 1748555
Depends on: 1748556
Depends on: 1748557
Depends on: 1748558
Depends on: 1748559
Depends on: 1748560
Depends on: 1748561
Depends on: 1748562
Depends on: 1748563
Depends on: 1748564
Depends on: 1748565
Depends on: 1748566
Depends on: 1748567
Depends on: 1748568
Depends on: 1748569
Depends on: 1748570
Depends on: 1748571
Depends on: 1755589
Depends on: 1762394
Depends on: 1771328
Severity: normal → S3
Depends on: 1795801
Depends on: 1822735
Depends on: 1830144
Depends on: 1834683
Depends on: 1851873
You need to log in before you can comment on or make changes to this bug.