Closed Bug 293583 Opened 20 years ago Closed 20 years ago

When phone home occurs for more than one extension the update info is used from the first extension update info

Categories

(Toolkit :: Add-ons Manager, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: robert.strong.bugs, Assigned: robert.strong.bugs)

Details

Attachments

(2 files, 1 obsolete file)

It appears that when installing more than one incompatible extension the update info (e.g. minVersion / maxVersion) from the first extension checked is used for all of the extensions installed. I found this by accident when I had an incorrect update rdf for the second extension I was installing during a tewo extension install. The first extension was also incompatible but had a correct update rdf. They both installed successfully. I then placed a couple of dump statements in the IncompatibleObserver::observe within nsExtensionManager.js and found this to be the case.
Flags: blocking-aviary1.1?
output from the console: *** Version Check Phone Home Completed this._xpi.path=<path>\staged-xpis\{34274bf4-1d97-a289-e984-17e546307e4f}\adblock-0.5.2.039-fx.xpi item.id={5DB6B72E-5C55-47a0-AB3B-945B4023E398} item.maxAppVersion=1.1 *** Version Check Phone Home Completed this._xpi.path=<path>\staged-xpis\{5DB6B72E-5C55-47a0-AB3B-945B4023E398}\testcase1.xpi item.id={5DB6B72E-5C55-47a0-AB3B-945B4023E398} item.maxAppVersion=1.1
Attached patch patch (obsolete) — Splinter Review
This bug occurs due to that installs and upgrades can start multiple phone homes since each item is checked individually hence why this doesn't occur during other updates. This patch simply adds the first item checked to the Update:Extension:Started and Update:Extension:Started notifyObservers as is already used with Update:Extension:Item-Ended and Update:Extension:Item-Error. It is then possible to do an early return in observes when we receive notification for an item that is different from the item we are actually checking.
Assignee: nobody → moz_bugzilla
Status: NEW → ASSIGNED
Attachment #184174 - Flags: review?(benjamin)
Attachment #184174 - Attachment is obsolete: true
Attachment #184174 - Flags: review?(benjamin)
Attached patch patchSplinter Review
Bah... forgot to include update.js in the diff.
Attachment #184176 - Flags: review?(benjamin)
Comment on attachment 184176 [details] [diff] [review] patch Depending on where 1.1a1 is, this is a very safe patch to take. But it's not the end of the world if it doesn't make it.
Attachment #184176 - Flags: review?(benjamin)
Attachment #184176 - Flags: review+
Attachment #184176 - Flags: approval-aviary1.1a1?
fixes an equality check (e.g. s/=/==/) found by gavin.
Attachment #184176 - Flags: approval-aviary1.1a1? → approval-aviary1.1a1+
patch checked in - thanks db48x - Resolved > Fixed
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Flags: blocking-aviary1.1?
Resolution: --- → FIXED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: