Closed Bug 1863034 Opened 2 years ago Closed 2 years ago

Check MOZ_WEBEXT_WEBIDL_ENABLED in WebExtensionPolicy.backgroundServiceWorkerEnabled

Categories

(WebExtensions :: General, task, P2)

task

Tracking

(firefox122 fixed)

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

Details

(Whiteboard: [addons-jira])

Attachments

(1 file)

The extension's background service worker is non-functional (as in having no extension APIs) when the application is compiled without MOZ_WEBEXT_WEBIDL_ENABLED.

The only limited use of the background service worker without extension APIs is for extensions whose only purpose is to call non-extension APIs (e.g. sending a network request). This is quite limited, so it could make sense to always return false from WebExtensionPolicy.backgroundServiceWorkerEnabled when MOZ_WEBEXT_WEBIDL_ENABLED is off. By doing so, the extensions.backgroundServiceWorker.enabled pref would effectively be ignored on non-Nightly builds.

This came up during the review of the patch to bug 1775618 at https://phabricator.services.mozilla.com/D192081#6365025

Assignee: nobody → rob
Severity: -- → N/A
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [addons-jira]
Pushed by rob@robwu.nl: https://hg.mozilla.org/integration/autoland/rev/8e569acf3aaa Lock backgroundServiceWorkerEnabled to false on non-Nightly r=rpl
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
Regressions: 1868565
Regressions: 1869555
See Also: → 1954067
See Also: → 1954070
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: