Closed Bug 1484844 Opened 2 years ago Closed 2 years ago

Make nsINIParser mutable

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: mossop, Assigned: mossop)

References

Details

Attachments

(1 file)

Bug 1474285 wants to add a new storage file mapping Firefox installs to default profiles. An ini makes sense as it is consistent with the existing storage. Rather than loading the entire file into a custom structure and then writing it out again which is problematic as users switch between versions that may have differing support for fields in the ini file I'd like to just make nsINIParser mutable allowing us to load, modify and then save the INI data.

There is an existing mutable INI file parser in JavaScript however that is unavailable in early startup. Likely we can get rid of the JS implementation in the future.
In order to implement profile-per-install we need a mutable INI parser in early
startup. The current one is implemented in JavaScript and thus not available.
This makes the current read-only C++ INI parser mutable and removes the
JavaScript implementation.

It turns out that the two different implementations of nsIINIParserFactory and
nsIINIParser behaved slightly differently but ionly in ways that the single test
cared about so I've adjusted things a little to make it work.
Comment on attachment 9002659 [details]
Bug 1484844: Make nsINIParser mutable. r=froydnj

Nathan Froyd [:froydnj] has approved the revision.
Attachment #9002659 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/ec7da761af74
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/a7e1bc3b72c3
Port bug 1484844 to TB/SM: remove nsINIProcessor.js/manifest from package manifests. rs=bustage-fix
You need to log in before you can comment on or make changes to this bug.