Closed Bug 1347971 Opened 7 years ago Closed 7 years ago

runtime.onInstalled previousVersion is undefined when extension loaded temporarily

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: frfxtst, Assigned: rhelmer)

Details

Attachments

(2 files)

Attached file testit.zip
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170302120751

Steps to reproduce:

Unzip the attached testcase and load it via "about:debugging". Reload the extension via the reload button. Check the browser console. The value of the property "previousVersion" should be shown. Instead "undefined" is shown. Tested with nightly from 2017-03-16.
Rob, you want to take a look?
Component: WebExtensions: General → Add-ons Manager
Flags: needinfo?(rhelmer)
Assignee: nobody → rhelmer
Flags: needinfo?(rhelmer)
We haven't really considered temporary add-ons to be an upgrade in any sense... I think that's a reasonable expectation for reload though and would allow people to test upgrade paths which is nice.

This means that reload won't be useful for testing new installs though which might not be what people expect... I suppose developers can uninstall via about:addons then reload the add-on via about:debugging which is a bit cumbersome. It might be nice to have an uninstall button in about:debugging to make this a better experience.

There's also the case of loading a temporary add-on ID over an existing ID in a lower-precedence location. I think we should probably preserve the current behavior there though.
Oh nevermind, I ran the test code and see the point here now. We *do* already pass "update" as the install reason, it's just a matter of returning the previous version.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 8848225 [details]
Bug 1347971 - pass oldVersion to install and startup methods for temporary add-on reloads

https://reviewboard.mozilla.org/r/121164/#review123206
Attachment #8848225 - Flags: review?(aswan) → review+
Pushed by rhelmer@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cacda47d7c81
pass oldVersion to install and startup methods for temporary add-on reloads r=aswan
https://hg.mozilla.org/mozilla-central/rev/cacda47d7c81
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: