Reviewing Bug #3229: Make content pref service memory-only + clearable
I noticed that nsContentPrefService.js can be expected to store prefs in memory, providing that any provided "loading context" has "usePrivateBrowsing" set to true, an assumption that may or may not hold for Firefox's Private Browsing (PB) mode. The patch for #3229 (closed) in addition applies to non-PB mode. Since Tor Browser uses PB mode by default, it's not entirely clear whether or not #3229 (closed) is needed.
To complicate matters, nsContentPrefService.js has been deprecated in favor of ContentPrefService2.jsm, at least in ESR31. In this new implementation, it looks like PB mode will also use an in-memory store, provided we make the same possibly dangerous assumption that loading contexts will always have "usePrivateBrowsing" set to true.
So my question is: should we drop the #3229 (closed) patch (assuming Firefox gets the loading contexts right), or should we be extra defensive and write a similar patch to apply to ContentPrefService2.jsm? Perhaps Mike has some insight here.