Closed Bug 1794162 Opened 2 years ago Closed 2 years ago

Only register `SitePermsAddonProvider` when the pref is enabled

Categories

(Toolkit :: Add-ons Manager, defect, P1)

defect

Tracking

()

RESOLVED FIXED
107 Branch
Tracking Status
firefox107 --- fixed

People

(Reporter: willdurand, Assigned: rpl)

References

Details

(Whiteboard: [addons-jira])

Attachments

(1 file)

The SitePermsAddonProvider should only be registered when the feature is enabled (controlled by the dom.sitepermsaddon-provider.enabled pref), otherwise we leak code that isn't supposed to be executed (or at least we do not expect that).

In a browser console without the pref mentioned above enabled:

for (const p of AddonManager.__AddonManagerInternal__.providers.entries()) { console.log(p[0].name); }
XPIProvider
SitePermsAddonProvider
GMPProvider

This is actually a (rather small) issue because we've got a report from a user who had the same error as described in Bug 1793365, except they didn't toggle any pref. Given Bug 1793365 is a different problem, this bug is only about avoiding the leak.

Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Severity: -- → S2
Type: task → defect
Priority: -- → P1
Whiteboard: [addons-jira]
Pushed by luca.greco@alcacoop.it: https://hg.mozilla.org/integration/autoland/rev/1e9a1155abc0 Only register `SitePermsAddonProvider` when the pref is enabled. r=nchevobbe,willdurand,timhuang
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
Blocks: 1796578
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: