Closed Bug 1747270 Opened 3 years ago Closed 3 years ago

Clarify relation between blocklist and addon types

Categories

(Toolkit :: Blocklist Implementation, task, P2)

task

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

Details

(Whiteboard: [addons-jira])

Attachments

(1 file)

ExtensionBlocklist in Blocklist.jsm uses AddonManager.getAddonsByType to retrieve a list of add-ons that can be blocklisted, and passes a list of addon types to supposedly get the right list of add-ons.

The relation between this list and the AddonManager is not obvious.
E.g. the blocklistv2 implementation contained a "service" type despite it having been removed a long time ago: https://searchfox.org/mozilla-central/diff/39b6e5018c67ee26c13012c49eb201a6aaf6b27f/toolkit/mozapps/extensions/Blocklist.jsm#776

Recently, a patch in bug 1741544 introduced the kXPIAddonTypes array and comments in Blocklist.jsm and XPIProvider.jsm to highlight the relationship between the Blocklist and AddonManager: https://hg.mozilla.org/mozilla-central/rev/a4773da4456d6441f52bfd50cd2cfbdf37b82e9b

The need to pay attention to comments is not ideal. Furthermore, the current implementation does still not clarify the exact need for passing the "types" array. Let's clarify that.

Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/4091bbb45883
Clarify use of addonTypes in Blocklist.jsm r=rpl
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: