gecko-dev/netwerk/test
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
..
browser Bug 1556844 - Enable more ESLint rules for netwerk, (auto & manual) fixes & format changes , r=dragana 2019-06-21 20:13:40 +00:00
crashtests Backed out changeset 4c1f06f4775c (bug 1543732) for crashtest failures on 785753-1.html. 2019-06-13 18:17:41 +03:00
fuzz Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-06-08 08:26:37 +00:00
gtest Bug 1536744 - Rename NS_NewURIOnAnyThread to NS_NewURI. r=baku 2019-05-28 14:17:04 +00:00
httpserver Bug 1558726. Stop using [array] in nsISocketTransportService. r=dragana 2019-06-13 04:21:32 +00:00
mochitests Bug 1541557: Part 5 - Update callers of ChromeScript.sendSyncMessage to use sendQuery instead. r=nika 2019-06-12 12:40:51 -07:00
reftest
unit Bug 1559356 - Make sure dweb URLs have a proper host r=kershaw 2019-06-28 13:12:49 +00:00
unit_ipc Bug 1556844 - Enable more ESLint rules for netwerk, (auto & manual) fixes & format changes , r=dragana 2019-06-21 20:13:40 +00:00
moz.build Bug 1528950 - Implement HTTP fuzzing target for Necko. r=dragana 2019-05-31 09:34:00 +00:00
TestBind.cpp Bug 1558726. Stop using [array] in nsISocketTransportService. r=dragana 2019-06-13 04:21:32 +00:00
TestCommon.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TestCookie.cpp Bug 1436674 - nsICookieService.idl should use ACString XPIDL type in place of the string type, r=Ehsan 2019-05-31 09:36:44 +00:00
TestNamedPipeService.cpp Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi 2019-04-05 21:42:17 +00:00
TestUDPSocket.cpp Bug 1558738. Stop using [array] in nsIUDPSocket. r=valentin 2019-06-12 07:00:01 +00:00