Closed Bug 607818 Opened 9 years ago Closed 2 years ago

Bootstrapped add-ons are being given the wrong reason code in some cases

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: mossop, Assigned: aswan)

References

Details

Attachments

(1 file)

Once bug 553017 is fixed the following problems will still exist:

Uninstalling a profile add-on and revealing another add-on should sent ADDON_DOWNGRADE/ADDON_UPGRADE to the shutdown, uninstall, install, startup methods of the two add-ons.

Detecting a removed profile add-on on startup and activating a previously hidden add-on should send ADDON_DOWNGRADE/ADDON_UPGRADE to the install method of the add-on.

Both cases currently still send reasonably sane reason codes so this shouldn't block the release
I'm experiencing this when upgrading a traditional addon with an Addon-SDK based one. After the needed restart, the bootstrapped version of the addon doesn't know it's an upgrade of a previous one as it receives the startup flag, not upgrade nor install.
Depends on: 854937
Duplicate of this bug: 1199743
Please see attachments / comments in bug 1199743 as a testcase for this bug. Thanks.
Assignee: nobody → aswan
Priority: -- → P3
Duplicate of this bug: 1401106
Attachment #8921205 - Flags: review?(kmaglione+bmo)
Comment on attachment 8921205 [details]
Bug 607818 Fix bootstrap reasons during addon upgrade/downgrade operations

https://reviewboard.mozilla.org/r/192206/#review197418

::: toolkit/mozapps/extensions/internal/XPIProvider.jsm:1681
(Diff revision 1)
> +   * of an add-on by ID and return the location and the XPIState.
> +   * @param {string} aId       The add-on ID
> +   * @param {string} aLocaname The name of the location to skip
> +   * @return {XPIState?}
> +   */
> +  findAddonSkipLocation(aId, aLocname) {

This is super specific... Can we just pass a location filter function to `findAddon` and have it default to `() => true`?
Attachment #8921205 - Flags: review?(kmaglione+bmo) → review+
Comment on attachment 8921205 [details]
Bug 607818 Fix bootstrap reasons during addon upgrade/downgrade operations

https://reviewboard.mozilla.org/r/192206/#review197418

> This is super specific... Can we just pass a location filter function to `findAddon` and have it default to `() => true`?

yeah, good idea
Pushed by aswan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ca99e68b3b36
Fix bootstrap reasons during addon upgrade/downgrade operations r=kmag
https://hg.mozilla.org/mozilla-central/rev/ca99e68b3b36
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Is manual testing required on this bug? If yes, please provide some STR and the proper extension(if required) or set the “qe-verify -“ flag.

Thanks!
Flags: needinfo?(aswan)
Flags: needinfo?(aswan) → qe-verify-
You need to log in before you can comment on or make changes to this bug.