mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
f70e67ad2d
The SpecialPowers set*Pref/get*Pref APIs currently use synchronous messaging to set and get preference values from the parent process. Aside from directly affecting callers of those APIs, it also affects callers of `pushPrefEnv`, which is meant to be asynchronous, but is in practice usually synchronous due to the synchronous messaging it uses. This patch updates the getPref APIs to use the in-process preference service (which most callers are expecting anyway), and also updates the callers of the setPref and pushPrefEnv APIs to await the result if they're relying on it taking effect immediately. Unfortunately, there are some corner cases in tests that appear to only work because of the quirks of the current sync messaging approach. The synchronous setPref APIs, for instance, trigger preference changes in the parent instantly, but don't update the values in the child until we've returned to the event loop and had a chance to process the notifications from the parent. The differnce in timing leads some tests to fail in strange ways, which this patch works around by just adding timeouts. There should be follow-ups for test owners to fix the flakiness. Differential Revision: https://phabricator.services.mozilla.com/D35054 --HG-- extra : rebase_source : 941298157e7c82f420cf50ce057154ce9b85301c extra : source : 189dc8a359815e059a4a217f788d183260bb2bfe |
||
---|---|---|
.. | ||
base | ||
ipc | ||
test |