Jed Davis 2ad421aaf8 Bug 1840515 - Step 1: Use -greomni/-appomni for content processes. r=nika,mhowell
Currently, each content process re-derives the path(s) of the omnijar
file(s).  We used to pass it down as a command-line argument, but
those args were also accepted by the parent process and there were
issues with that (CVE-2020-6799) such that they were completely removed
(bug 1531475).  However, content processes can generally trust their
arguments; note that they currently accept `-appDir`.

We were already using `-gredir` for this on Android (it has a unified
omnijar, so there's no `-appdir` in that case); this patch subsumes the
content-process case of that, but not the parent process (which consumes
basically a fake argv constructed in Java code).

Note that only the parent process and content processes use the
omnijars; every other process type uses either minimal XPCOM, which
doesn't include them, or no XPCOM at all (e.g., GMP before bug 1845946).

The end goal of this patch series is to use those flags with the fork
server (so that it can preload the files without needing any XPCOM), but
this patch changes only the case of content processes.

Differential Revision: https://phabricator.services.mozilla.com/D182510
2023-08-09 21:35:49 +00:00
..