gecko-dev/toolkit/components/prompts
Kris Maglione 3e44c16cf9 Bug 1541557: Part 5 - Update callers of ChromeScript.sendSyncMessage to use sendQuery instead. r=nika
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
2019-06-12 12:40:51 -07:00
..
content Bug 1547463 Explicit load customElements.js where necessary r=bgrins 2019-04-29 18:14:17 +00:00
src Bug 1560192 - Clean up prompt open calls in Prompter.jsm. r=Gijs 2019-06-19 21:59:18 +00:00
test Bug 1541557: Part 5 - Update callers of ChromeScript.sendSyncMessage to use sendQuery instead. r=nika 2019-06-12 12:40:51 -07:00
jar.mn Bug 1512048 - Convert tabmodalprompt binding to JSM module r=Gijs 2019-01-04 19:29:34 +00:00
moz.build