Last Comment Bug 902956 - Preserve unknown fields in XPI JSON database
: Preserve unknown fields in XPI JSON database
Status: NEW
:
Product: Toolkit
Classification: Components
Component: Add-ons Manager (show other bugs)
: unspecified
: All All
-- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Andy McKay [:andym]
Mentors:
Depends on: 853388
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-08 08:50 PDT by :Irving Reid (No longer working on Firefox)
Modified: 2013-08-08 19:27 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description User image :Irving Reid (No longer working on Firefox) 2013-08-08 08:50:26 PDT
One of the side goals for bug 853388 was to make the JSON datastore more permissive about preserving unknown attributes stored in the database; this could make us more flexible in handling multiple versions of FF sharing the same profile (for example, a developer who switches between versions, or someone who downgrades FF).

My initial thought for implementing this is to keep the DB data in a separate object as read from the database, and auto-generate getters and setters for the known fields when we create the DBAddonInternal. At the same time, we can make the setter compare the new value to the existing and automatically trigger the DeferredSave if the value changes.
Comment 1 User image Blair McBride [:Unfocused] (UNAVAILABLE) 2013-08-08 19:27:18 PDT
It would be good for XPIDatabase and AddonRepository to have the same mechanism for doing this - whether that means doing the same here, or modifying AddonRepository to fit what ends up being done here.

Note You need to log in before you can comment on or make changes to this bug.