Closed
Bug 1251366
Opened 8 years ago
Closed 7 years ago
Consider cleaning up the bitfield in PrefTypeFlags in modules/libpref/prefapi.h
Categories
(Core :: Preferences: Backend, defect, P3)
Tracking
()
RESOLVED
DUPLICATE
of bug 1418156
Tracking | Status | |
---|---|---|
firefox47 | --- | affected |
People
(Reporter: milan, Assigned: milan)
References
Details
Attachments
(2 files)
See bug 1249157 comment 3. We have a uint16_t that stores both the preference type (int, string, bool), as well as some flags about that preference (has default, etc.) Bit fiddling being what it is, we could consider using bool:1 or some such to clean the code. It would be all internal to PrefTypeFlags at this point, the implementation is not exposed outside the class. One thing to consider is the size of PrefHashEntry (also in prefapi.h). Bug 1248521 reduced the size from 40 to 32 bytes, if any work is done in this bug, it shouldn't increase that value. For example, the "obvious": PrefType bool flag:1 bool flag:1 ... bool flag:1 gets us back to 40 bytes.
Assignee | ||
Comment 1•8 years ago
|
||
Assignee | ||
Comment 2•8 years ago
|
||
Assignee | ||
Comment 3•8 years ago
|
||
It seems we care about the size, so we would not want option 2. Arguably, option 1 is still nicer code than the existing version.
Depends on: 1249157
OS: Unspecified → All
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → milan
Updated•8 years ago
|
Priority: -- → P3
Comment 4•7 years ago
|
||
I ended up doing this in bug 1418156.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•