Closed
Bug 1199743
Opened 9 years ago
Closed 9 years ago
Events for install, upgrade, enable are not run when upgrading from XUL-based add-on
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 607818
People
(Reporter: bugzilla, Unassigned)
Details
Attachments
(2 files)
I have been looking into upgrading one of my add-ons from being XUL-based using overlays to SDK-based. In the SDK-based version of the add-on I want to run some code on first run (or enable), so I hooked into exports.main as per the documentation: https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Listening_for_load_and_unload This works fine for a fresh install of the SDK-based version of the add-on, but doesn't seem to ever get called when upgrading an existing Firefox profile that has the XUL-based version installed. This is a problem as it means there's no sensible place to hook code that initialises an add-on. The only workaround I have found so far is to listen for the "startup" load reason, i.e. a normal browser startup and then store a preference to know whether or not to run additional code. This is clearly suboptimal. Please see sample code on GitHub at https://github.com/benbasson/firefox-addon-upgrade-test I will attach XPIs directly to this bug.
Reporter | ||
Comment 1•9 years ago
|
||
Sorry, meant to set this as UNCONFIRMED. I forgot I still had privs on here.
Status: NEW → UNCONFIRMED
Ever confirmed: false
Reporter | ||
Comment 2•9 years ago
|
||
Reporter | ||
Comment 3•9 years ago
|
||
I note that the Bootstrap documentation explains this away, but doesn't actually offer any real solution to the problem: https://developer.mozilla.org/en-US/Add-ons/Bootstrapped_extensions#Bootstrap_data
Updated•9 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•