Closed Bug 1557630 Opened 5 years ago Closed 5 years ago

Improve Preferences accessor

Categories

(Core :: Preferences: Backend, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: jya, Assigned: jya)

References

Details

Attachments

(1 file)

As discussed in bug 1554559, Part 3; the code has become rather heavy with lots of duplicated code due to how the preferences' getter/setter are defined, like
SetXXX and GetXXX where XXX is one of Bool, Int, Float, CString etc.

We could rewrite some of this through templates. It would make the code shorter.

We use templates where appropriate instead.

Assignee: nobody → jyavenard
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a36380745805
P1. Simplify Preferences' getters code. r=njn

The errors are all about stuff like:
JavaScript error: /Users/cltbld/tasks/task_1560250216/build/tests/bin/components/httpd.js, line 3318: NS_ERROR_NOT_AVAILABLE:

looks like an infra error to me.

Flags: needinfo?(jyavenard)
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/64ba1e5a243b
P1. Simplify Preferences' getters code. r=njn
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69

A key difference between the landings of comment 2 and comment 5 was that the SetIsVoid() special case for GetCString() out param modification on failure was restored.

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

Attachment

General

Created:
Updated:
Size: