mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
3e44c16cf9
Since JSWindowActors don't have direct access to synchronous messaging, ChromeScript callers are going to need to migrate to asynchronous messaging and queries instead. Since there's no comparable API to sendQuery for frame message managers, this patch adds a stub that uses synchronous messaging, but makes the API appear asynchronous, and migrates callers to use it instead of direct synchronous messaging. This will be replaced with a true synchronous API in the actor migration. Fortunately, most of the time, this actually leads to simpler code. The `sendQuery` API doesn't have the odd return value semantics of `sendSyncMessage`, and can usually just be used as a drop-in replacement. Many of the `sendSyncMessage` callers don't actually use the result, and can just be changed to `sendAsyncMessage`. And many of the existing async messaging users can be changed to just use `sendQuery` rather than sending messages and adding response listeners. However, the APZ code is an exception. It relies on intricate properties of the event loop, and doesn't have an easy way to slot in promise handlers, so I migrated it to using sync messaging via process message managers instead. Differential Revision: https://phabricator.services.mozilla.com/D35055 --HG-- extra : rebase_source : d5707e87f293a831a5cf2e0b0a7e977090267f78 extra : source : 75ebd6fce136ab3bd0e591c2b8b2d06d3b5bf923 |
||
---|---|---|
.. | ||
base | ||
build | ||
cache | ||
cache2 | ||
cookie | ||
dns | ||
ipc | ||
locales | ||
mime | ||
protocol | ||
sctp | ||
socket | ||
srtp | ||
streamconv | ||
system | ||
test | ||
url-classifier | ||
wifi | ||
moz.build | ||
necko-config.h.in |