"Once" preferences should have a constant value during the lifetime of the parent process.
Categories
(Core :: Preferences: Backend, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox69 | --- | fixed |
People
(Reporter: jya, Assigned: jya)
References
Details
Attachments
(3 files)
This is an issue that existed with gfxPrefs which I believe needs to be addressed.
gfxPrefs was initialised at various points and varied according to the process type.
In all processes where xpcom/Preferences was setup (necko, content processes) gfxPrefs were initialised based on the underlying Preferences.
Once preferences as such would be based on the value of that Preference at the time the process was created.
That means that if the preference had been changed since the parent process started, you could have Once gfxPrefs having different values between content process.
In process without xpcom (GPU and RDD process) the gfxPrefs were initialiased first when the process was created with their default value. And in the respective process RecvInit method, they would then set to the updated value of the gfxPrefs as it existed in the Parent process.
So GPU and RDD gfxPrefs Once gfxPrefs didn't change.
Then the RDD enabled xpcom in bug 1539029; after that it would have the same behaviour of the content processes: gfxPrefs Once being set to the preference value at the time the process got launched.
In bug 1548795 we removed gfxPrefs and now use StaticPrefs.
But those have the same issue as gfxPrefs in xpcom enabled process: The Once StaticPrefs are set to the preference value at the time the process is launched. And as such, can vary between process.
Similar to bug 1554334. We want to add consistency to what Once preferences.
I believe it should always be the same across all processes, regardless of the time those processes were launched.
| Assignee | ||
Comment 1•6 years ago
|
||
Will also silence static analysis in phabricator whenever a caller of this code is used.
| Assignee | ||
Comment 2•6 years ago
|
||
This allows for an entry to not show in about:config.
This will be used to store Once StaticPrefs once they become immutable.
Depends on D33419
| Assignee | ||
Comment 3•6 years ago
|
||
When we create the SharedPreferenceMap we store the value of the Once pref in it. All child processes will now read the Once pref from the read-only SharedPreferenceMap.
This makes the Once prefs immutable once we start the first child process.
Depends on D33420
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 4•6 years ago
|
||
:kmag, friendly reminder that those changes are waiting for your review.
Comment 6•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/bf6105304228
https://hg.mozilla.org/mozilla-central/rev/6a6477be5a1c
https://hg.mozilla.org/mozilla-central/rev/a0de9c43eb20
Updated•6 years ago
|
Description
•