Convert the browser.cache.* VarCache prefs
Categories
(Core :: Preferences: Backend, task)
Tracking
()
People
(Reporter: KrisWright, Unassigned)
References
Details
The varcache pref browser.cache.disk.telemetry_report_ID
[1] should be converted to a static pref, but because its mirror variable is manipulated directly in the code [2] it wouldn't keep in sync with a static pref. This pref may need to be reworked to use RegisterCallback
instead.
[1] https://searchfox.org/mozilla-central/rev/9ae20497229225cb3fa729a787791f424ff8087b/netwerk/cache2/CacheObserver.cpp#107
[2] https://searchfox.org/mozilla-central/rev/9ae20497229225cb3fa729a787791f424ff8087b/netwerk/cache2/CacheObserver.cpp#221
Comment 1•5 years ago
|
||
browser.cache.disk.capacity
and browser.cache.disk.amount_written
are similar, and should probably be dealt with at the same time.
Updated•4 years ago
|
Comment 2•4 years ago
|
||
Properly making this about
- browser.cache.disk.telemetry_report_ID
- browser.cache.disk.capacity
- browser.cache.disk.amount_written
See additional discussion: https://bugzilla.mozilla.org/show_bug.cgi?id=1637727#c9
Reporter | ||
Comment 3•4 years ago
|
||
Since making this bug, browser.cache.disk.telemetry_report_ID
was removed which leaves us with browser.cache.disk.capacity
and browser.cache.disk.amount_written
. The callback mechanism doesn't look like a good candidate for getting rid of these since it's only accessible on the main thread, but as these are some of the last remaining VarCache uses they need to be addressed so we can unblock bug 1448219 and get rid of the VarCache mechanism. I'm not familiar with this code so I'm not sure what the best way forward is with these. Usually, I would convert prefs like these to static prefs, but these are manipulated directly in the c++ so it isn't possible to use a static pref.
Per discussion in Bug 1637727 these values aren't even good candidates for prefs, because they aren't meant to be manipulated by the user. This means they may need another mechanism entirely, but most importantly the VarCache uses need to go if we want to get rid of the old VarCache machinery. Since we've finally managed to wind its (hundreds of) uses down to the six or so prefs remaining, I'm hoping to get rid of these so they don't block the removal of VarCache itself.
Michal, would you be willing to help us get rid of these prefs?
Comment 4•4 years ago
|
||
(In reply to Kris Wright :KrisWright from comment #3)
Michal, would you be willing to help us get rid of these prefs?
I filed bug 1645051 and bug 1645052 for this work.
Reporter | ||
Comment 5•4 years ago
|
||
Looks like these are all removed now.
Description
•