Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Перейти к файлу
Aaron Klotz 09593d71de Bug 1608301: Part 3 - Add an allocator for generating unique service names and instance IDs; r=geckoview-reviewers,snorp
`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
2020-03-10 15:25:03 +00:00
.cargo Bug 1619283 - Use SourceAtomSet/ScriptAtomSet and atomize strings at the beginning. r=nbp 2020-03-09 20:21:07 +00:00
.vscode Bug 1594520 - Change directory before running mach in .vscode/tasks.json on Windows. r=jya 2019-11-14 10:35:12 +00:00
accessible Bug 1620218 - Automatic code fixes for Prettier 1.18.2 upgrade. r=mossop,webcompat-reviewers 2020-03-08 21:45:16 +00:00
browser Bug 1621096 - Land WNPanel message for 75 r=fluent-reviewers,flod 2020-03-10 10:17:00 +00:00
build Bug 1619460 - ensure subsequent runs of `./mach build-backend` under Python 3 produce consistent results r=dmajor 2020-03-09 22:34:19 +00:00
caps Bug 1620624 - Refactor nsUrlClassifier r=ckerschb 2020-03-10 13:13:02 +00:00
chrome Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop 2020-03-07 10:09:44 +00:00
config Bug 1619460 - ensure subsequent runs of `./mach build-backend` under Python 3 produce consistent results r=dmajor 2020-03-09 22:34:19 +00:00
devtools Bug 1589132 - Remove husky from debugger. r=jlast 2020-03-10 00:01:18 +00:00
docs Bug 1620635 - doc follow up - fix a typo DONTBUILD 2020-03-07 12:13:02 +00:00
docshell Bug 1546759 - Change nsSHistory::WalkHistoryEntries to walk browsing context tree instead of doc shell tree, r=peterv,nika 2020-03-10 14:28:22 +00:00
dom Bug 865550 - Add a crashtest based on the test case for the bug 2020-03-10 15:26:14 +00:00
editor Bug 1620504 - part 10: Clean up warnings in EditorBase r=m_kato 2020-03-09 14:57:24 +00:00
extensions Bug 1620322 - Part 6: Refactor the code related to user interactions out of AntiTrackingCommon.cpp; r=baku 2020-03-09 23:36:35 +00:00
gfx Backed out 2 changesets (bug 1614933) for busages complaining about IdleSchedulerChild.cpp CLOSED TREE 2020-03-10 17:21:55 +02:00
gradle/wrapper Bug 1595926 - Don't use distribution256Sum until Android Studio is fixed. r=snorp 2019-11-14 17:04:32 +00:00
hal Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown 2020-02-27 17:39:15 +00:00
image Bug 1620322 - Part 9: Move ContentBlockingLog to antitracking to keep all related code together in the same place; r=baku 2020-03-09 23:36:39 +00:00
intl Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop 2020-03-07 10:09:44 +00:00
ipc Bug 1619460 - ensure subsequent runs of `./mach build-backend` under Python 3 produce consistent results r=dmajor 2020-03-09 22:34:19 +00:00
js Bug 1621265: Remove a bogus assertion that assumed any JSOp::SetArg is incompatible with lazy arguments. r=jandem 2020-03-10 14:26:47 +00:00
layout Bug 1620952: part 4) Group caret members in `nsFrameSelection`. r=jfkthame 2020-03-10 14:08:11 +00:00
media Bug 1620322 - Part 8: Rename AntiTrackingCommon to ContentBlocking; r=baku 2020-03-09 23:36:39 +00:00
memory Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop 2020-03-07 10:09:44 +00:00
mfbt Bug 1620433 - Update xxHash to version 0.7.3. r=dthayer 2020-03-06 05:00:59 +00:00
mobile Bug 1608301: Part 3 - Add an allocator for generating unique service names and instance IDs; r=geckoview-reviewers,snorp 2020-03-10 15:25:03 +00:00
modules Bug 1620824 - Add content encoding support for TRRServiceChannel r=valentin 2020-03-10 14:28:27 +00:00
mozglue Bug 1613985 - Use default for equivalent-to-default constructors/destructors in mozglue. r=glandium 2020-03-10 08:47:24 +00:00
netwerk Bug 1619460 - ensure subsequent runs of `./mach build-backend` under Python 3 produce consistent results r=dmajor 2020-03-09 22:34:19 +00:00
nsprpub Bug 1600803 - NSPR_4_25_RTM for Firefox 74. r=kjacobs UPGRADE_NSPR_RELEASE 2020-02-03 12:17:20 +00:00
other-licenses Bug 1618103 Part 2 - Update ATK header file to pick up new roles, r=Jamie 2020-02-27 21:45:55 +00:00
parser Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop 2020-03-07 10:09:44 +00:00
python Bug 1619460 - ensure subsequent runs of `./mach build-backend` under Python 3 produce consistent results r=dmajor 2020-03-09 22:34:19 +00:00
remote Bug 1620218 - Automatic code fixes for Prettier 1.18.2 upgrade. r=mossop,webcompat-reviewers 2020-03-08 21:45:16 +00:00
security Backed out 2 changesets (bug 1614933) for busages complaining about IdleSchedulerChild.cpp CLOSED TREE 2020-03-10 17:21:55 +02:00
services Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2020-03-09 15:41:51 +00:00
servo Bug 1618509 - Allow to export a shadow part under multiple names. r=jwatt 2020-03-09 13:04:21 +00:00
startupcache Bug 1613985 - Use default for equivalent-to-default constructors/destructors in startupcache. r=nika 2020-03-10 08:48:37 +00:00
storage Backed out 2 changesets (bug 1603703) for xpc failures on test_storage_aggregates.js. CLOSED TREE 2020-03-05 19:37:32 +02:00
taskcluster Bug 1621252 - Move Fenix tests to tire 1 r=perftest-reviewers,sparky 2020-03-10 13:21:27 +00:00
testing Bug 1598114 - Update WPTs expectations after implementation of AudioWorkletNode parameters. r=karlt 2020-03-05 00:56:51 +00:00
third_party Bug 1619283 - Use SourceAtomSet/ScriptAtomSet and atomize strings at the beginning. r=nbp 2020-03-09 20:21:07 +00:00
toolkit Backed out 2 changesets (bug 1614933) for busages complaining about IdleSchedulerChild.cpp CLOSED TREE 2020-03-10 17:21:55 +02:00
tools Bug 1619554 Improve performance of |mach try fuzzy| preview r=ahal 2020-03-05 19:58:43 +00:00
uriloader Bug 1598216 - Change file extensions with invalid characters to valid file extensions on save. r=Gijs 2020-03-09 16:11:13 +00:00
view Bug 1503656 - Part 7. Notify of safe area insets changed. r=smaug 2020-03-04 08:16:31 +00:00
widget Bug 1620973 [Wayland] Make opaque regions configurable by widget.wayland.use-opaque-region, r=jhorak 2020-03-09 14:06:58 +00:00
xpcom Merge autoland to mozilla-central. a=merge 2020-03-09 23:47:11 +02:00
xpfe/appshell Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpfe. r=mstange 2020-03-10 08:47:24 +00:00
.arcconfig
.clang-format
.clang-format-ignore Bug 1353652 - Initial Draft of MPRIS API Provider (Media API on Linux) r=alwu 2020-02-12 13:10:50 +00:00
.cron.yml Bug 1619944 Migrate partials and pipfile-updates to use requirements.txt r=bhearsum 2020-03-05 13:49:24 +00:00
.eslintignore Bug 1620542 - Turn on linting of .eslintrc.js files. r=mossop 2020-03-07 09:30:44 +00:00
.eslintrc.js Bug 1618188 - remove XML backend for plugin and add-on blocklisting, r=mconley,perftest-reviewers,whimboo 2020-03-09 12:02:17 +00:00
.flake8 Bug 1597336 - add a fxa+sync scenario r=lina,markh 2020-02-23 23:17:23 +00:00
.gdbinit
.gdbinit_python
.git-blame-ignore-revs
.gitattributes
.gitignore Bug 1614314 - Use GitHub as upstream for the Java code of the HTML parser. r=alchen 2020-02-10 15:05:17 +00:00
.hg-annotate-ignore-revs
.hg-format-source
.hgignore Bug 1600339 - Measure responsiveness while evaluating messages r=k88hudson,mconley 2020-01-18 21:08:40 +00:00
.hgtags No bug - Tagging mozilla-central 34377d8c0d2ad98f525b26e7ad8003dbdac94da6 with FIREFOX_NIGHTLY_75_END a=release DONTBUILD CLOSED TREE 2020-03-09 15:37:31 +00:00
.lldbinit Bug 1603804. Move third_party/python/lldbutils to python/lldbutils. r=ahal 2019-12-20 17:10:12 +00:00
.mailmap
.prettierignore Bug 1609671 - Inspect binding should try to get the sourcemapped location while inspecting a function. r=jdescottes,vporof 2020-01-24 12:58:24 +00:00
.prettierrc Bug 1620218 - Update Prettier to 1.18.2 and other ESLint modules to the latest versions. r=mossop 2020-03-08 21:45:23 +00:00
.taskcluster.yml Bug 1606869: Switch decision task docker caches to match the rest the in-tree caches; r=Callek 2020-01-03 22:18:29 +00:00
.trackerignore
.yamllint Bug 1606009 - Fix & silent some tests r=Callek 2019-12-26 22:13:18 +00:00
.ycm_extra_conf.py
AUTHORS
CLOBBER Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2020-03-09 15:41:51 +00:00
Cargo.lock Bug 1619283 - Use SourceAtomSet/ScriptAtomSet and atomize strings at the beginning. r=nbp 2020-03-09 20:21:07 +00:00
Cargo.toml Backed out changeset 4c839456c3ff (bug 1620284) for build bustages on a CLOSED TREE 2020-03-06 12:33:59 +02:00
GNUmakefile
LEGAL
LICENSE
Makefile.in Bug 1618280 - make `make distclean` work again; r=dmajor 2020-02-26 18:14:36 +00:00
README.txt Bug 1617846 - Replace IRC with matrix.r=firefox-source-docs-reviewers,sylvestre 2020-02-25 11:39:53 +00:00
aclocal.m4
build.gradle Bug 1608570 - Remove some old Fennec-related build variables r=nalexander 2020-01-10 22:51:03 +00:00
client.mk
client.py
configure.in
configure.py Bug 1619788 - Ensure files generated by `./mach configure` don't have CRLF line endings, even under Python 3 r=glandium 2020-03-06 02:19:21 +00:00
gradle.properties
gradlew
gradlew.bat
mach Bug 1619475 - partial Python 3 compatibility for jit-tests and jstests r=arai 2020-03-06 18:07:38 +00:00
moz.build Bug 1609278 - Replace bugzilla product and component assignment 'Firefox for Android :: General' with 'GeckoView :: General'. r=kbrosnan DONTBUILD 2020-03-06 17:54:58 +00:00
moz.configure Bug 1620980 - Fix Windows artifact builds after bug 1620165. r=froydnj 2020-03-10 00:23:40 +00:00
mozilla-config.h.in
old-configure.in Bug 1618752 - Fix the Windows cross builds so they include MSVC runtime DLLs. r=froydnj 2020-02-28 12:33:36 +00:00
package-lock.json Bug 1620218 - Update Prettier to 1.18.2 and other ESLint modules to the latest versions. r=mossop 2020-03-08 21:45:23 +00:00
package.json Bug 1620218 - Update Prettier to 1.18.2 and other ESLint modules to the latest versions. r=mossop 2020-03-08 21:45:23 +00:00
settings.gradle Bug 1598010 - Move examples into mozilla-central r=agi 2019-11-22 13:30:57 +00:00
substitute-local-geckoview.gradle Bug 1581979 - Use -SNAPSHOT versions locally to enable the local GeckoView substitution flow. r=nalexander 2019-12-11 21:29:44 +00:00
test.mozbuild

README.txt

An explanation of the Mozilla Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://firefox-source-docs.mozilla.org/contributing/directory_structure.html

For information on how to build Mozilla from the source code and create the patch see:

    https://firefox-source-docs.mozilla.org/contributing/how_to_contribute_firefox.html

If you have a question about developing Mozilla, and can't find the solution
on https://developer.mozilla.org, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel.


Nightly development builds can be downloaded from:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    https://www.mozilla.org/firefox/channel/desktop/#nightly

Keep in mind that nightly builds, which are used by Mozilla developers for
testing, may be buggy.