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•3 years 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•3 years 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•3 years ago
|
| Assignee | ||
Comment 3•3 years 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.
Comment 5•3 years 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
•