Preload the omnijars in the fork server
Categories
(Core :: IPC, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox118 | --- | fixed |
People
(Reporter: jld, Assigned: jld)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
See bug 1840512 for more details, but, the fork server process should open the omnijar files (if present; an unpackaged build run via ./mach run
doesn't have them) before forking, so the child processes inherit the original files even if they're replaced or removed.
Fortunately, it's possible to initialize mozilla::Omnijar
— a process which includes instantiating nsLocalFile
— without starting XPCOM, and comments indicate that we're already doing this on Android, so it should be relatively well tested already.
Assignee | ||
Comment 1•11 months ago
|
||
The goal of this patch is to ensure that the forked child processes will
have the correct jar files already opened, even after they're replaced
by an update or removed from the filesystem.
We're already doing something vaguely similar for child processes on
Android, so this patch builds on it. The fork server is now given
command-line flags with both omnijar paths, so that it won't need to
use the XPCOM directory service to find them, and then uses them to
initialize the Omnijar
class (which also doesn't require XPCOM) before
forking.
Assignee | ||
Comment 2•10 months ago
|
||
The -appomni
flag isn't currently used, but the next patch will bring
it back and change how both flags are processed in child processes.
Updated•10 months ago
|
Assignee | ||
Comment 3•10 months ago
|
||
This extends the previous support for -greomni
and -appomni
to the
fork server, so that it can pre-open the jar files and thus continue
using the correct versions in forked child processes even if the files on
disk are replaced by an update or deleted.
Pushed by jedavis@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8f0ce073d4fc Step 0: Use GeckoArgs for the `-greomni` and `-appomni` flags. r=nika https://hg.mozilla.org/integration/autoland/rev/e35715879bf8 Step 1: Use -greomni/-appomni for content processes. r=nika,mhowell https://hg.mozilla.org/integration/autoland/rev/3a910f33826b Step 2: Preload the omnijars in the fork server. r=nika
Comment 5•10 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8f0ce073d4fc
https://hg.mozilla.org/mozilla-central/rev/e35715879bf8
https://hg.mozilla.org/mozilla-central/rev/3a910f33826b
Description
•