gecko-dev/dom/serviceworkers
Blake Kaplan 13fc0d95f9 Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth
Currently, we are required to fire updatefound in three cases:

  * When a "soft" update finds an update.
  * When a call to ServiceWorkerRegistration.update finds an update.
  * When ServiceWorkerContainer.register registers a ServiceWorker.

In the first case, there are no requirements on the timing of the event. For
the second two cases, however, the promise returned by update or register
needs to resolve before updatefound is dispatched. We hack around the first
case by explicitly counting the calls to update and only dispatching
updatefound when the final promise resolves. In the case of SWC.register, the
ServiceWorkerRegistration object might not even exist when it notices that we
need to fire updatefound, which suggests that we need some code to tell it
when to fire the event; except that in the soft update case, there is no
obvious place to do so. So, the easiest way to resolve this is to have the
parent process tell the ServiceWorkerRegistration when to fire updatefound
itself. This way, we don't rely on any tricky timing and everything is
consistent with itself.

Differential Revision: https://phabricator.services.mozilla.com/D13368

--HG--
extra : moz-landing-system : lando
2018-11-29 23:06:32 +00:00
..
test Bug 1438945 - Part 5: SharedWorker browser test. r=asuth 2018-11-19 15:18:21 -08:00
IPCServiceWorkerDescriptor.ipdlh Bug 1471706 P1 Track each registration state change with a version number stored on the descriptor. r=mrbkap 2018-07-02 07:44:19 -07:00
IPCServiceWorkerRegistrationDescriptor.ipdlh Bug 1459209 P14 Implement RemoteServiceWorkerContainerImpl::GetRegistrations() across IPC to the parent-side SWM. r=mrbkap 2018-07-09 16:02:41 -07: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 1471189 - Removing 'Terminating' state in workers, r=mrbkap 2018-07-12 19:33:41 +02:00
RemoteServiceWorkerContainerImpl.h Bug 1459209 P3 Scaffold RemoteServiceWorkerContainerImpl to connect the binding ServiceWorkerContainer to the PServiceWorkerContainerChild actor. r=mrbkap 2018-07-09 16:02:39 -07:00
RemoteServiceWorkerImpl.cpp Bug 1471189 - Removing 'Terminating' state in workers, r=mrbkap 2018-07-12 19:33:41 +02:00
RemoteServiceWorkerImpl.h Bug 1459209 P2 Scaffold RemoteServiceWorkerImpl to connect the binding ServiceWorker to the PServiceWorkerChild actor. r=mrbkap 2018-07-09 16:02:39 -07:00
RemoteServiceWorkerRegistrationImpl.cpp Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth 2018-11-29 23:06:32 +00:00
RemoteServiceWorkerRegistrationImpl.h Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth 2018-11-29 23:06:32 +00:00
ServiceWorker.cpp Bug 1502802 - Implement PostMessageOptions for Client and ServiceWorker, r=smaug 2018-10-29 16:26:30 +01:00
ServiceWorker.h Bug 1502802 - Implement PostMessageOptions for Client and ServiceWorker, r=smaug 2018-10-29 16:26:30 +01:00
ServiceWorkerActors.cpp Bug 1459209 P4 Scaffold RemoteServiceWorkerRegistrationImpl to connect the binding registration to the actor. r=mrbkap 2018-07-09 16:02:39 -07:00
ServiceWorkerActors.h Bug 1459209 P1 Add IPC actor boilerplate for PServiceWorker, PServiceWorkerContainer, and PServiceWorkerRegistration. r=mrbkap 2018-07-09 16:02:39 -07:00
ServiceWorkerChild.cpp Bug 1459209 P2 Scaffold RemoteServiceWorkerImpl to connect the binding ServiceWorker to the PServiceWorkerChild actor. r=mrbkap 2018-07-09 16:02:39 -07:00
ServiceWorkerChild.h Bug 1459209 P2 Scaffold RemoteServiceWorkerImpl to connect the binding ServiceWorker to the PServiceWorkerChild actor. r=mrbkap 2018-07-09 16:02:39 -07:00
ServiceWorkerCloneData.cpp Bug 1462466 P1 Add a ServiceWorkerCloneData type with threadsafe ref-counting. r=baku 2018-06-25 07:03:18 -07:00
ServiceWorkerCloneData.h Bug 1462466 P1 Add a ServiceWorkerCloneData type with threadsafe ref-counting. r=baku 2018-06-25 07:03:18 -07:00
ServiceWorkerContainer.cpp Bug 1399446 - implement ServiceWorkerGlobalScope and ServiceWorkerContainer onmessageerror event handlers r=edenchuang,baku 2018-10-22 21:22:25 +00:00
ServiceWorkerContainer.h Bug 1399446 - implement ServiceWorkerGlobalScope and ServiceWorkerContainer onmessageerror event handlers r=edenchuang,baku 2018-10-22 21:22:25 +00:00
ServiceWorkerContainerChild.cpp Bug 1459209 P3 Scaffold RemoteServiceWorkerContainerImpl to connect the binding ServiceWorkerContainer to the PServiceWorkerContainerChild actor. r=mrbkap 2018-07-09 16:02:39 -07:00
ServiceWorkerContainerChild.h Bug 1459209 P3 Scaffold RemoteServiceWorkerContainerImpl to connect the binding ServiceWorkerContainer to the PServiceWorkerContainerChild actor. r=mrbkap 2018-07-09 16:02:39 -07:00
ServiceWorkerContainerImpl.cpp Bug 1459209 P3 Scaffold RemoteServiceWorkerContainerImpl to connect the binding ServiceWorkerContainer to the PServiceWorkerContainerChild actor. r=mrbkap 2018-07-09 16:02:39 -07:00
ServiceWorkerContainerImpl.h Bug 1466681 P4 Make ServiceWorkerContainer::Inner::GetRegistrations() use callbacks instead of MozPromise. r=asuth 2018-06-15 12:21:33 -07:00
ServiceWorkerContainerParent.cpp Bug 1459209 P15 Implement RemoteServiceWorkerContainerImpl::GetReady() across IPC to the parent-side SWM. r=mrbkap 2018-07-09 16:02:41 -07:00
ServiceWorkerContainerParent.h Bug 1459209 P15 Implement RemoteServiceWorkerContainerImpl::GetReady() across IPC to the parent-side SWM. r=mrbkap 2018-07-09 16:02:41 -07:00
ServiceWorkerContainerProxy.cpp Bug 1459209 P15 Implement RemoteServiceWorkerContainerImpl::GetReady() across IPC to the parent-side SWM. r=mrbkap 2018-07-09 16:02:41 -07:00
ServiceWorkerContainerProxy.h Bug 1459209 P15 Implement RemoteServiceWorkerContainerImpl::GetReady() across IPC to the parent-side SWM. r=mrbkap 2018-07-09 16:02:41 -07:00
ServiceWorkerDescriptor.cpp Bug 1471706 P1 Track each registration state change with a version number stored on the descriptor. r=mrbkap 2018-07-02 07:44:19 -07:00
ServiceWorkerDescriptor.h Bug 1471706 P1 Track each registration state change with a version number stored on the descriptor. r=mrbkap 2018-07-02 07:44:19 -07:00
ServiceWorkerEvents.cpp Bug 1264177 - Implement FetchEvent.resultingClientId r=edenchuang,mrbkap 2018-11-15 08:28:23 +00:00
ServiceWorkerEvents.h Bug 1264177 - Implement FetchEvent.resultingClientId r=edenchuang,mrbkap 2018-11-15 08:28:23 +00:00
ServiceWorkerImpl.cpp Bug 1462772 P5 Remove now-unused Listener logic in ServiceWorkerInfo. r=mrbkap 2018-07-02 07:44:18 -07:00
ServiceWorkerImpl.h Bug 1462772 P5 Remove now-unused Listener logic in ServiceWorkerInfo. r=mrbkap 2018-07-02 07:44:18 -07:00
ServiceWorkerInfo.cpp Bug 1469048 Disable service worker propagation when e10s pref is enabled. r=mrbkap 2018-07-09 16:02:41 -07:00
ServiceWorkerInfo.h Bug 1471706 P1 Track each registration state change with a version number stored on the descriptor. r=mrbkap 2018-07-02 07:44:19 -07:00
ServiceWorkerInterceptController.cpp
ServiceWorkerInterceptController.h
ServiceWorkerIPCUtils.h
ServiceWorkerJob.cpp Bug 1459209 P4 Scaffold RemoteServiceWorkerRegistrationImpl to connect the binding registration to the actor. r=mrbkap 2018-07-09 16:02:39 -07:00
ServiceWorkerJob.h
ServiceWorkerJobQueue.cpp Bug 1459209 P3 Scaffold RemoteServiceWorkerContainerImpl to connect the binding ServiceWorkerContainer to the PServiceWorkerContainerChild actor. r=mrbkap 2018-07-09 16:02:39 -07:00
ServiceWorkerJobQueue.h
ServiceWorkerManager.cpp Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre 2018-11-28 00:54:56 +00:00
ServiceWorkerManager.h Bug 1509450 - Remove unnecessary inclusions of ContentParent.h and ContentChild.h r=froydnj 2018-11-26 14:49:44 +00:00
ServiceWorkerManagerChild.cpp
ServiceWorkerManagerChild.h
ServiceWorkerManagerParent.cpp
ServiceWorkerManagerParent.h
ServiceWorkerManagerService.cpp Bug 1469048 Disable service worker propagation when e10s pref is enabled. r=mrbkap 2018-07-09 16:02:41 -07:00
ServiceWorkerManagerService.h
ServiceWorkerParent.cpp Bug 1459209 P8 Implement RemoteServiceWorkerImpl::PostMessage() across IPC and to the parent-side SWM. r=mrbkap 2018-07-09 16:02:40 -07:00
ServiceWorkerParent.h Bug 1459209 P8 Implement RemoteServiceWorkerImpl::PostMessage() across IPC and to the parent-side SWM. r=mrbkap 2018-07-09 16:02:40 -07:00
ServiceWorkerPrivate.cpp Bug 1264177 - Implement FetchEvent.resultingClientId r=edenchuang,mrbkap 2018-11-15 08:28:23 +00:00
ServiceWorkerPrivate.h Bug 1264177 - Implement FetchEvent.resultingClientId r=edenchuang,mrbkap 2018-11-15 08:28:23 +00:00
ServiceWorkerProxy.cpp Bug 1459209 P8 Implement RemoteServiceWorkerImpl::PostMessage() across IPC and to the parent-side SWM. r=mrbkap 2018-07-09 16:02:40 -07:00
ServiceWorkerProxy.h Bug 1459209 P8 Implement RemoteServiceWorkerImpl::PostMessage() across IPC and to the parent-side SWM. r=mrbkap 2018-07-09 16:02:40 -07:00
ServiceWorkerRegisterJob.cpp Bug 1462466 P1 Add a ServiceWorkerCloneData type with threadsafe ref-counting. r=baku 2018-06-25 07:03:18 -07:00
ServiceWorkerRegisterJob.h
ServiceWorkerRegistrar.cpp Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj 2018-06-01 17:59:07 +02:00
ServiceWorkerRegistrar.h
ServiceWorkerRegistrarTypes.ipdlh
ServiceWorkerRegistration.cpp Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth 2018-11-29 23:06:32 +00:00
ServiceWorkerRegistration.h Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth 2018-11-29 23:06:32 +00:00
ServiceWorkerRegistrationChild.cpp Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth 2018-11-29 23:06:32 +00:00
ServiceWorkerRegistrationChild.h Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth 2018-11-29 23:06:32 +00:00
ServiceWorkerRegistrationDescriptor.cpp Bug 1471706 P1 Track each registration state change with a version number stored on the descriptor. r=mrbkap 2018-07-02 07:44:19 -07:00
ServiceWorkerRegistrationDescriptor.h Bug 1471706 P1 Track each registration state change with a version number stored on the descriptor. r=mrbkap 2018-07-02 07:44:19 -07:00
ServiceWorkerRegistrationImpl.cpp Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth 2018-11-29 23:06:32 +00:00
ServiceWorkerRegistrationImpl.h Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth 2018-11-29 23:06:32 +00:00
ServiceWorkerRegistrationInfo.cpp Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth 2018-11-29 23:06:32 +00:00
ServiceWorkerRegistrationInfo.h Bug 1471706 P2 Maintain a version list of ServiceWorkerRegistrationInfo state changes. r=mrbkap 2018-07-02 07:44:19 -07:00
ServiceWorkerRegistrationListener.h Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth 2018-11-29 23:06:32 +00:00
ServiceWorkerRegistrationParent.cpp Bug 1459209 P10 Implement RemoteServiceWorkerRegistrationImpl::Unregister() across IPC to the parent-side SWM. r=mrbkap 2018-07-09 16:02:40 -07:00
ServiceWorkerRegistrationParent.h Bug 1459209 P10 Implement RemoteServiceWorkerRegistrationImpl::Unregister() across IPC to the parent-side SWM. r=mrbkap 2018-07-09 16:02:40 -07:00
ServiceWorkerRegistrationProxy.cpp Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth 2018-11-29 23:06:32 +00:00
ServiceWorkerRegistrationProxy.h Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth 2018-11-29 23:06:32 +00:00
ServiceWorkerScriptCache.cpp Bug 1486698 - Update Fetch+Stream implementation to throw when the stream is disturbed or locked, r=bz 2018-10-31 18:30:18 +01:00
ServiceWorkerScriptCache.h Bug 1459209 P4 Scaffold RemoteServiceWorkerRegistrationImpl to connect the binding registration to the actor. r=mrbkap 2018-07-09 16:02:39 -07:00
ServiceWorkerUnregisterCallback.cpp Bug 1509135 - Only define UnregisterCallback once r=mrbkap 2018-11-27 00:58:44 +00:00
ServiceWorkerUnregisterCallback.h Bug 1509135 - Only define UnregisterCallback once r=mrbkap 2018-11-27 00:58:44 +00:00
ServiceWorkerUnregisterJob.cpp Bug 1459209 P3 Scaffold RemoteServiceWorkerContainerImpl to connect the binding ServiceWorkerContainer to the PServiceWorkerContainerChild actor. r=mrbkap 2018-07-09 16:02:39 -07:00
ServiceWorkerUnregisterJob.h
ServiceWorkerUpdateJob.cpp Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth 2018-11-29 23:06:32 +00:00
ServiceWorkerUpdateJob.h Bug 1471631 Move ServiceWorkerManager::AddRegistrationEventListener() code to ServiceWorkerRegistrationInfo. r=mrbkap 2018-07-02 07:44:19 -07:00
ServiceWorkerUpdaterChild.cpp Bug 1469048 Disable service worker propagation when e10s pref is enabled. r=mrbkap 2018-07-09 16:02:41 -07:00
ServiceWorkerUpdaterChild.h
ServiceWorkerUpdaterParent.cpp
ServiceWorkerUpdaterParent.h
ServiceWorkerUtils.cpp Bug 1459209 P1 Add IPC actor boilerplate for PServiceWorker, PServiceWorkerContainer, and PServiceWorkerRegistration. r=mrbkap 2018-07-09 16:02:39 -07:00
ServiceWorkerUtils.h Bug 1459209 P1 Add IPC actor boilerplate for PServiceWorker, PServiceWorkerContainer, and PServiceWorkerRegistration. r=mrbkap 2018-07-09 16:02:39 -07:00