Closed Bug 1337535 Opened 7 years ago Closed 7 years ago

Ability to dynamically add new add-on types

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: osmose, Unassigned)

References

Details

I'm looking into adding a new add-on type in bug 1337528, but SHIELD is implemented as a system add-on. The steps that I've found thusfar for adding a new type are:

1. Add the new type to the various static lists in XPIProvider.jsm[1]
2. Define and register a provider for the new type (e.g. [2]).
3. Tweak the AddonManager XUL to add any extra UI your listing might need.

#1 is pretty much impossible to do programmatically as far as I can tell. It'd be nice if we could dynamically add a new add-on type, but there's probably issues. For starters, how do we ensure that new add-on types don't have conflicting type numbers?

Is this a viable/reasonable thing to have?

[1] https://dxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/internal/XPIProvider.jsm
[2] https://dxr.mozilla.org/mozilla-central/source/browser/experiments/Experiments.jsm#517
I don't think we add/remove types enough for this to be useful... we make a lot of assumptions that the types are static. It also raises issues like how to treat add-ons that are an unknown type (but maybe previously registered?)

In any case I think we can go years without adding or removing types so it doesn't seem worth the overhead.

This seems like the kind of thing that should live in the addons manager code.

If the concern is about shipping faster, this seems like the sort of thing that is safe and isolated enough to easily uplift.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.