Preserve unknown fields in XPI JSON database

NEW
Unassigned

Status

()

Toolkit
Add-ons Manager
4 years ago
4 years ago

People

(Reporter: Irving, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

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.
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.
You need to log in before you can comment on or make changes to this bug.