Thanks for doing this. However I feel like our options for code that need preferences off the main thread are a bit poor. The first option is to send an IPC message to the main thread but that has very poor performance, requires a lot of boilerplate code and either an sync message or async+restructuring the control flow. The second option is to read the preferences on startup and have them as read-only shared globals like gfxPrefs: http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxPrefs.h#106
Ideally I'd like to only read in the preference when/if I need to access it, particularly as we have increasingly more code living off the main thread. On Thu, Mar 6, 2014 at 11:20 AM, Kyle Huey <m...@kylehuey.com> wrote: > It's taken over 3 years, but Bug 619487 is now fixed, and the > preferences service will assert (fatally) if you try to use it off the > main thread. This is currently disabled on b2g while I track down the > last misuses of the pref service in b2g-specific code. > > After the next train leaves I plan to upgrade these to release mode > assertions so we can start catching addons that misuse the pref > service. > > - Kyle > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform