Closed Bug 864650 Opened 11 years ago Closed 6 years ago

Send an event after an add-ons bootstrap methods have been called

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: Unfocused, Unassigned)

References

Details

Attachments

(1 file)

Before bug 727398, onInstallEnded was fired after startup() was called. That broke things, so startup() gets called after all events now. However... that seems to have broken a use-case, where it can be useful to know when startup() has been called. Bug 749745 hacks around this with a setTimeout, which is gross. And bug 853388 comment 10 hit it. So, it seems it would be useful to fire an event after each bootstrap method is called. Maybe just one event, with the bootstrap method name as a param would work (just to keep it lightweight).
As far as I can tell, the Addon SDK wrapper around the addon installer, which is the code affected by bug 749745, isn't used anywhere I can see other than the test suite. I don't see it in the public addon SDK docs at https://addons.mozilla.org/en-US/developers/docs/sdk/latest/. Given that, perhaps it would be better to redefine the behaviour of the addon SDK promise so that it resolves after install and before startup, and fix the test to reflect that. As far as the problem in https://bugzilla.mozilla.org/show_bug.cgi?id=853388#c10, I still wonder if the right behaviour is to move the Components.manager.addBootstrappedManifestLocation(manifest) call to a different place, but I admit I don't understand the implications of when we register the manifest vs. all the other life cycle events yet.
(In reply to :Irving Reid from comment #1) > As far as I can tell, the Addon SDK wrapper around the addon installer, > which is the code affected by bug 749745, isn't used anywhere I can see > other than the test suite. I don't see it in the public addon SDK docs at > https://addons.mozilla.org/en-US/developers/docs/sdk/latest/. Given that, > perhaps it would be better to redefine the behaviour of the addon SDK > promise so that it resolves after install and before startup, and fix the > test to reflect that. We use it in the add-on builder helper add-on.
Assignee: nobody → dtownsend+bugmail
Attached patch WIP (deleted) — Splinter Review
For safety in case I never get back around to this. Last worked on this a while ago so not sure how far along it is. I think it mostly passes xpcshell tests but the browser tests need to be updated to work.
Assignee: dtownsend+bugmail → nobody
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: