Closed Bug 1484844 Opened 2 years ago Closed 2 years ago

Make nsINIParser mutable


(Core :: XPCOM, enhancement)

Not set



Tracking Status
firefox63 --- fixed


(Reporter: mossop, Assigned: mossop)




(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+
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Pushed by
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.