Closed Bug 664833 Opened 13 years ago Closed 13 years ago

Having a pending install for an existing add-on when a schema migration occurs will break the extension manager

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla7

People

(Reporter: mossop, Assigned: mossop)

Details

Attachments

(1 file)

Attached patch patch rev 1Splinter Review
Found during bug 659772. If there is a pending install for an existing add-on (for the same version) and a schema migration is also performed during startup then we'll fail to copy the compatibility info from the old database to the new install of the add-on, breaking in the process. The problem is that we cache the AddonInternal for the new add-on as a json text file we then re-read using plain JSON decoding which gives us back something with all the properties of an AddonInternal but none of the functions. The solution here is to add a fromJSON function to AddonInternal that kind of mirrors the toJSON function and restores all properties from the decoded json to a real AddonInternal.
Attachment #539885 - Flags: review?(robert.bugzilla)
Comment on attachment 539885 [details] [diff] [review] patch rev 1 looks good
Attachment #539885 - Flags: review?(robert.bugzilla) → review+
Whiteboard: [has patch][needs review rs] → [has patch]
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Flags: in-litmus-
Resolution: --- → FIXED
Whiteboard: [has patch]
Target Milestone: --- → mozilla7
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: