gecko-dev/dom/serviceworkers
Valentin Gosu 5ac68030f7 Bug 1487100 - Allow calling nsICacheInfoChannel.preferAlternativeDataType(altDataType, contentType) multiple times r=michal,luke
This patch changes the way we set and handle the preferred alternate data type.
It is no longer just one choice, but a set of preferences, each conditional
on the contentType of the resource.

For example:
  var cc = chan.QueryInterface(Ci.nsICacheInfoChannel);
  cc.preferAlternativeDataType("js-bytecode", "text/javascript");
  cc.preferAlternativeDataType("ammended-text", "text/plain");
  cc.preferAlternativeDataType("something-else", "");

When loaded from the cache, the available alt-data type will be checked against
"js-bytecode" if the contentType is "text/javascript", "ammended-text" if the contentType is "text/plain" or "something-else" for all contentTypes.
Note that the alt-data type could be "something-else" even if the contentType is "text/javascript".

The preferences are saved as an nsTArray<mozilla::Tuple<nsCString, nsCString>>.

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

--HG--
extra : rebase_source : eb4961f05a52e557e7d2d986d59e0a2cf18a3447
extra : source : dd1c31ea78c2b15d14750d137037a54d50719997
2018-10-17 13:58:30 +00:00
..
test Bug 1499397 - ServiceWorker tests should run with cookiePolicy 0, r=ehsan 2018-10-17 07:37:53 +02: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
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 1459209 P11 Propogate registration state changes back from the parent to the child. r=mrbkap 2018-07-09 16:02:40 -07: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 1471189 - Removing 'Terminating' state in workers, r=mrbkap 2018-07-12 19:33:41 +02:00
RemoteServiceWorkerRegistrationImpl.h Bug 1459209 P11 Propogate registration state changes back from the parent to the child. r=mrbkap 2018-07-09 16:02:40 -07:00
ServiceWorker.cpp Bug 1489844 - Port DOMPrefs to StaticPrefs - part 8 - dom.serviceWorkers.enabled, r=ehsan 2018-09-10 20:36:15 +02:00
ServiceWorker.h Bug 1462772 P4 Route ServiceWorker state changes through the ServiceWorkerRegistration. r=mrbkap 2018-07-02 07:44:18 -07: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 1263734: Implement ServiceWorkerContainer.startMessages() r=asuth,smaug 2018-10-11 12:37:37 +00:00
ServiceWorkerContainer.h Bug 1263734: Implement ServiceWorkerContainer.startMessages() r=asuth,smaug 2018-10-11 12:37:37 +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 1487100 - Allow calling nsICacheInfoChannel.preferAlternativeDataType(altDataType, contentType) multiple times r=michal,luke 2018-10-17 13:58:30 +00:00
ServiceWorkerEvents.h Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot 2018-06-26 17:05:01 -07:00
ServiceWorkerIPCUtils.h
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
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 1488792: Reject calls to update() while service worker in 'installing' state r=asuth 2018-10-10 08:20:01 +00:00
ServiceWorkerManager.h Bug 1482921 - The ServiceWorkerManager should no longer use these types. r=asuth 2018-08-14 07:59:11 +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 1487100 - Allow calling nsICacheInfoChannel.preferAlternativeDataType(altDataType, contentType) multiple times r=michal,luke 2018-10-17 13:58:30 +00:00
ServiceWorkerPrivate.h Bug 1459209 P1 Add IPC actor boilerplate for PServiceWorker, PServiceWorkerContainer, and PServiceWorkerRegistration. r=mrbkap 2018-07-09 16:02:39 -07: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 Bug 1452373 Only allow one runnable to write to serviceworker.txt at a time. r=asuth 2018-04-10 12:31:18 -07:00
ServiceWorkerRegistrarTypes.ipdlh
ServiceWorkerRegistration.cpp Bug 1472303 - Backed out changeset 8a40d04dfcbb. r=asuth 2018-08-24 10:24:28 -04:00
ServiceWorkerRegistration.h Bug 1472005 Don't resolve ready promise until the registration has reached the right state version. r=mrbkap 2018-07-05 13:13:48 -04:00
ServiceWorkerRegistrationChild.cpp Bug 1459209 P11 Propogate registration state changes back from the parent to the child. r=mrbkap 2018-07-09 16:02:40 -07:00
ServiceWorkerRegistrationChild.h Bug 1459209 P11 Propogate registration state changes back from the parent to the child. r=mrbkap 2018-07-09 16:02:40 -07: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 1472303 - Backed out changeset 8a40d04dfcbb. r=asuth 2018-08-24 10:24:28 -04:00
ServiceWorkerRegistrationImpl.h Bug 1471929 P3 Remove the old updatefound infrastructure in favor of always updating the registration state and auto-dispatch. r=mrbkap 2018-07-05 13:13:48 -04:00
ServiceWorkerRegistrationInfo.cpp Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug 2018-10-01 21:38:01 +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 1471929 P3 Remove the old updatefound infrastructure in favor of always updating the registration state and auto-dispatch. r=mrbkap 2018-07-05 13:13:48 -04: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 1459209 P11 Propogate registration state changes back from the parent to the child. r=mrbkap 2018-07-09 16:02:40 -07:00
ServiceWorkerRegistrationProxy.h Bug 1459209 P10 Implement RemoteServiceWorkerRegistrationImpl::Unregister() across IPC to the parent-side SWM. r=mrbkap 2018-07-09 16:02:40 -07:00
ServiceWorkerScriptCache.cpp Bug 1478306 - Actually use the sandbox we create in CacheCreator::CreateCacheStorage. r=baku 2018-08-01 11:25:49 +02: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
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 1459209 P2 Scaffold RemoteServiceWorkerImpl to connect the binding ServiceWorker to the PServiceWorkerChild actor. r=mrbkap 2018-07-09 16:02:39 -07: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
moz.build Bug 1459209 P7 Scaffold a ServiceWorkerContainerProxy class to connect the parent actor to the main thread SWM. r=mrbkap 2018-07-09 16:02:40 -07:00