gecko-dev/dom/serviceworkers
Kris Maglione 4379a1c586 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 : 1bbb7afa0aa4b27e12213b7a113d40efaac79e75
2019-06-12 12:40:51 -07: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
IPCServiceWorkerDescriptor.ipdlh Bug 1534364 - replace OptionalIPCServiceWorkerDescriptor with IPCServiceWorkerDescriptor? in IPDL: r=valentin 2019-03-15 12:55:10 +00:00
IPCServiceWorkerRegistrationDescriptor.ipdlh Bug 1534364 - replace OptionalIPCServiceWorkerDescriptor with IPCServiceWorkerDescriptor? in IPDL: r=valentin 2019-03-15 12:55:10 +00:00
moz.build Bug 1509135 - Only define UnregisterCallback once r=mrbkap 2018-11-27 00:58:44 +00:00
PServiceWorker.ipdl Bug 1459209 P8 Implement RemoteServiceWorkerImpl::PostMessage() across IPC and to the parent-side SWM. r=mrbkap 2018-07-09 16:02:40 -07:00
PServiceWorkerContainer.ipdl Bug 1459209 P15 Implement RemoteServiceWorkerContainerImpl::GetReady() across IPC to the parent-side SWM. r=mrbkap 2018-07-09 16:02:41 -07:00
PServiceWorkerManager.ipdl
PServiceWorkerRegistration.ipdl Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth 2018-11-29 23:06:32 +00:00
PServiceWorkerUpdater.ipdl
RemoteServiceWorkerContainerImpl.cpp Bug 1512298 - Make IPDL MozPromise exclusive. r=gerald,froydnj 2018-12-11 19:22:26 +00:00
RemoteServiceWorkerContainerImpl.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
RemoteServiceWorkerImpl.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
RemoteServiceWorkerImpl.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
RemoteServiceWorkerRegistrationImpl.cpp Bug 1512298 - Make IPDL MozPromise exclusive. r=gerald,froydnj 2018-12-11 19:22:26 +00:00
RemoteServiceWorkerRegistrationImpl.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorker.cpp Bug 1554361 - Move the high-level storage access check APIs to mozilla/StorageAccess.h; r=baku 2019-05-27 14:06:49 +00:00
ServiceWorker.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
ServiceWorkerActors.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerActors.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerChild.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerChild.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerCloneData.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerCloneData.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerContainer.cpp Bug 1557793 part 3. Change the signatures of various nsContentUtils localization methods to play nicer with the new stringbundle API. r=smaug 2019-06-08 21:26:12 +00:00
ServiceWorkerContainer.h Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
ServiceWorkerContainerChild.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerContainerChild.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerContainerImpl.cpp Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan 2019-04-05 21:41:42 +00:00
ServiceWorkerContainerImpl.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerContainerParent.cpp Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan 2019-04-05 21:41:42 +00:00
ServiceWorkerContainerParent.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerContainerProxy.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerContainerProxy.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerDescriptor.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerDescriptor.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerEvents.cpp Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
ServiceWorkerEvents.h Bug 1490044 - Remove DOMPrefs. r=bzbarsky 2019-06-13 09:02:03 +00:00
ServiceWorkerImpl.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerImpl.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerInfo.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerInfo.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerInterceptController.cpp Bug 1554361 - Move the high-level storage access check APIs to mozilla/StorageAccess.h; r=baku 2019-05-27 14:06:49 +00:00
ServiceWorkerInterceptController.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerIPCUtils.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerJob.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerJob.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerJobQueue.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerJobQueue.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerManager.cpp Bug 1490044 - Remove DOMPrefs. r=bzbarsky 2019-06-13 09:02:03 +00:00
ServiceWorkerManager.h Bug 1320404 - Remove appId from origin attributes - part 1 - OriginAttributes and nsIPrincipal, r=Ehsan,flod 2019-05-03 17:13:17 +00:00
ServiceWorkerManagerChild.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerManagerChild.h Bug 1512990 - Part 4 - remove declarations of Recv/Answer methods from IPDL protocol base class; r=froydnj 2019-02-06 15:58:43 +00:00
ServiceWorkerManagerParent.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerManagerParent.h Bug 1512990 - Part 4 - remove declarations of Recv/Answer methods from IPDL protocol base class; r=froydnj 2019-02-06 15:58:43 +00:00
ServiceWorkerManagerService.cpp Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
ServiceWorkerManagerService.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerParent.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerParent.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerPrivate.cpp Bug 1555050: Always (if non null) set any CSP as cspToInherit on the loadinfo of new document load. Update documentation for GetCSP, GetPreloadCSP() and GetCSPToInherit and update two callsites which called GetCSP instead of GetCSPToInherit. r=bzbarsky 2019-06-06 20:19:56 +00:00
ServiceWorkerPrivate.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerProxy.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerProxy.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerRegisterJob.cpp Bug 1527000 - Stop passing a null or empty nsILoadGroup to ServiceWorker CompareNetwork, r=asuth 2019-02-15 04:56:12 +00:00
ServiceWorkerRegisterJob.h Bug 1527000 - Stop passing a null or empty nsILoadGroup to ServiceWorker CompareNetwork, r=asuth 2019-02-15 04:56:12 +00:00
ServiceWorkerRegistrar.cpp Bug 965637: Move CSP from Principal into Client, part 2: worker changes. r=baku 2019-05-21 23:14:50 +00:00
ServiceWorkerRegistrar.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerRegistrarTypes.ipdlh
ServiceWorkerRegistration.cpp Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
ServiceWorkerRegistration.h Bug 1490044 - Remove DOMPrefs. r=bzbarsky 2019-06-13 09:02:03 +00:00
ServiceWorkerRegistrationChild.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerRegistrationChild.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerRegistrationDescriptor.cpp Bug 1534364 - replace OptionalIPCServiceWorkerDescriptor with IPCServiceWorkerDescriptor? in IPDL: r=valentin 2019-03-15 12:55:10 +00:00
ServiceWorkerRegistrationDescriptor.h Bug 1534364 - replace OptionalIPCServiceWorkerDescriptor with IPCServiceWorkerDescriptor? in IPDL: r=valentin 2019-03-15 12:55:10 +00:00
ServiceWorkerRegistrationImpl.cpp Bug 1490044 - Remove DOMPrefs. r=bzbarsky 2019-06-13 09:02:03 +00:00
ServiceWorkerRegistrationImpl.h Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
ServiceWorkerRegistrationInfo.cpp Bug 1550059 - Clear ServiceWorker(Registration)Infos on shutdown. r=asuth 2019-05-28 21:14:44 +00:00
ServiceWorkerRegistrationInfo.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerRegistrationListener.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerRegistrationParent.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerRegistrationParent.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerRegistrationProxy.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-03-31 15:12:55 +00:00
ServiceWorkerRegistrationProxy.h Bug 1472307 - Implement delay update mechanism in ServiceWorkerRegistrationProxy. r=asuth 2019-03-14 10:19:13 +00:00
ServiceWorkerScriptCache.cpp Bug 1498102 - Ensure that rejection of the promise created in serviceWorkerScriptCache::PurgeCache isn't visible on the console; r=asuth 2019-04-02 19:56:27 +00:00
ServiceWorkerScriptCache.h Bug 1531263 - Wrong prototype for Compare() function in ServiceWorkerScriptCache, r=asuth 2019-02-28 18:57:46 +00:00
ServiceWorkerUnregisterCallback.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerUnregisterCallback.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerUnregisterJob.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerUnregisterJob.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerUpdateJob.cpp Bug 1557793 part 3. Change the signatures of various nsContentUtils localization methods to play nicer with the new stringbundle API. r=smaug 2019-06-08 21:26:12 +00:00
ServiceWorkerUpdateJob.h Bug 1527000 - Stop passing a null or empty nsILoadGroup to ServiceWorker CompareNetwork, r=asuth 2019-02-15 04:56:12 +00:00
ServiceWorkerUpdaterChild.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerUpdaterChild.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerUpdaterParent.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerUpdaterParent.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerUtils.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ServiceWorkerUtils.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00