mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
09593d71de
`ServiceAllocator` wraps the various `Context.bindService` APIs and manages the allocation of service names (in the case of non-isolated services) or instance names (in the case of isolated services on Android 10+). During the first allocation of a content process, we construct a policy that is used for all content process allocations. The `DefaultContentPolicy` computes the maximum number of content processes and then allocates those names using a `BitSet`. The `IsolatedContentPolicy` tracks the number of live content processes, but simply uses a monotonically-increasing counter for generating instance IDs. This patch also adds a `ServiceUtils` class that contains numerous functions relating to generating service names and retrieving information about service definitions in this package. * Content processes are now named `tab0` through `tabN`. When a single content process name is used (either for single-e10s or for the process name used by isolated services), we always use `tab0`. * I am not wedded to the names of the priorities used in the `PriorityLevel` enum -- suggestions welcome! * Some of the `ServiceUtils` functions could arguably go into `ContextUtils` instead, but I thought that this was fine since they are fairly specific to this use case. * Further modifications will need to be made to support multiple priorities. This patch is enough to get everything up and running for testing, with further prioritization work being done in bug 1620145. Differential Revision: https://phabricator.services.mozilla.com/D65636 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
android | ||
locales |