At some point, UtilityAudioDecoderChild lost the ability to work
*without* a GPU process. This patch remedies that by creating an
alternate connection for the endpoint, modeled after the code in
RDDProcessManager.
Differential Revision: https://phabricator.services.mozilla.com/D223015
At some point, UtilityAudioDecoderChild lost the ability to work
*without* a GPU process. This patch remedies that by creating an
alternate connection for the endpoint, modeled after the code in
RDDProcessManager.
Differential Revision: https://phabricator.services.mozilla.com/D223015
We leave the network.trr.confirmation_telemetry_enabled pref intact because
removing it causes failures in test_prefs_tracker.js
Differential Revision: https://phabricator.services.mozilla.com/D223832
At some point, UtilityAudioDecoderChild lost the ability to work
*without* a GPU process. This patch remedies that by creating an
alternate connection for the endpoint, modeled after the code in
RDDProcessManager.
Differential Revision: https://phabricator.services.mozilla.com/D223015
I've kept the header because I don't know how much we want to diverge
from upstream, specially in places like webrtc, but I think this is worth it.
Differential Revision: https://phabricator.services.mozilla.com/D224504
The construction currently starts in the child using a datastore id. This extra
step and complexity is not needed anymore since a received endpoint for a top
level actor can be bound to any event target.
Differential Revision: https://phabricator.services.mozilla.com/D222420
The conversion will allow:
- returning an endpoint instead of a datastore id when datastore preparation is
done
- binding the child actor to a different event target
Long term, it would be possible to bind the parent actor to a dedicated task
queue or existing LS thread, helping to relieve the PBackground thread.
Differential Revision: https://phabricator.services.mozilla.com/D222417
At some point, UtilityAudioDecoderChild lost the ability to work
*without* a GPU process. This patch remedies that by creating an
alternate connection for the endpoint, modeled after the code in
RDDProcessManager.
Differential Revision: https://phabricator.services.mozilla.com/D223015
After this change, the fork server no longer uses a Dup2Sequence to set
fixed FD offsets when starting child processes, instead using the new
geckoargs system.
Because this was pretty disruptive to thow the fork server works and was
previously integrated into LaunchApp, the forkserver code has generally been
moved out of the chromium codebase, and inlined into the ForkServer files.
As the linux chroot sandbox code needs to run the chroot server from a process
created during forking, it is now being sent down to the fork server
separately, though the child end of the pipe is still being passed using
GeckoArgs.
Finally, the primary IPC pipe used by the fork server is also changed to
be passed using geckoargs into the fork server, and the fork server
being used is made more explicit in GeckoChildProcessHost, as launching
using the fork server now requires different arguments than launching
normally (due to needing to pass down the ChildProcessArgs).
Differential Revision: https://phabricator.services.mozilla.com/D221380
The code which decodes the XPC bootstrap message hasn't landed into
mozilla-central yet, so only the serializing side in GeckoChildProcessHost is
updated here.
Differential Revision: https://phabricator.services.mozilla.com/D221379
This changes how file descriptors are passed to Android child processes to
support the new ChildProcessArgs model. Instead of explicit lists of FDs to pass
around, a single array of FDs is passed from the parent process into the child
service and then passed into GeckoArgs.
Differential Revision: https://phabricator.services.mozilla.com/D221378
This effectively mimics the old system using fixed FDs for passing the
arguments down.
An in-memory array of FDs is used to track which FD corresponds with
with file argument, which is initialized to the fixed offsets, in order
to allow platforms which cannot use fixed FDs in their child processes
to specify explicit files being passed down. This will be used in the
fork server, for Android, and for iOS.
Differential Revision: https://phabricator.services.mozilla.com/D221377
Windows is the simplest platform to support, as HANDLEs are inherited by
identity into the child process, and there's less variance between different
OSes.
This effectively re-implements the existing behaviour used for HANDLE
passing on Windows by passing the handle directly on the command line.
Differential Revision: https://phabricator.services.mozilla.com/D221376
Previously these arguments were initialized in places which would be
inconvenient to use geckoargs with. This patch changes them to both be
initialized during SandboxLaunch::Configure in the parent process, and
then be passed down to the process launching code either within the
LaunchOptions object, or in the ChildProcessArgs object.
Unfortunately, we need to read the command line arguments within
XRE_InitChildProcess, rather than SandboxEarlyInit, as the sandbox code
is not linked directly to libxul, where the file handle GeckoArgs
methods are defined.
One of the more significant functional changes here is that when using
the fork server, the chroot pipe will be created within the parent
process, with the server end of the pipe passed over IPC to the fork
server to be used to create the chroot server. This is a bit
unnecessary, but keeps things simpler for the fork server, as geckoargs
are transferred directly from the parent process to the forked child
processes over the forkserver exec pipe.
Differential Revision: https://phabricator.services.mozilla.com/D221375
The initial IPC pipe was previously the only argument passed as a chromium
command line flag. This changes it to instead be passed using geckoargs,
unifying the platforms, and removing the need for specific handling on every
platform.
Differential Revision: https://phabricator.services.mozilla.com/D221374
The crash reporter pipe was previously passed as a positional argument with
custom code for each platform. On some platforms it is implemented as a file
being passed, which is now directly supported by geckoargs.
Differential Revision: https://phabricator.services.mozilla.com/D221373
This helps unify some logic between platforms, and removes some positional
arguments from the command line, so it ended up in this patch stack, despite
not technically being required to pass FDs directly.
Differential Revision: https://phabricator.services.mozilla.com/D221372
This patch implements the majority of the public interface for the new IPC
handle passing design.
The rough design is an expansion of `geckoargs` to allow passing
`UniqueFileHandle` arguments to child processes. This replaces the existing
extra options array to make the list of files explicit.
This currently just replaces things which were already passed this way on the
command line from outside of GeckoChildProcessHost. Note that this does not
migrate callers which were not already passing file handles using geckoargs,
and does not implement the actual OS-level support for passing arguments this
way.
Differential Revision: https://phabricator.services.mozilla.com/D221371
At some point, UtilityAudioDecoderChild lost the ability to work
*without* a GPU process. This patch remedies that by creating an
alternate connection for the endpoint, modeled after the code in
RDDProcessManager.
Differential Revision: https://phabricator.services.mozilla.com/D223015
At some point, UtilityAudioDecoderChild lost the ability to work
*without* a GPU process. This patch remedies that by creating an
alternate connection for the endpoint, modeled after the code in
RDDProcessManager.
Differential Revision: https://phabricator.services.mozilla.com/D223015
At some point, UtilityAudioDecoderChild lost the ability to work
*without* a GPU process. This patch remedies that by creating an
alternate connection for the endpoint, modeled after the code in
RDDProcessManager.
Differential Revision: https://phabricator.services.mozilla.com/D223015
At some point, UtilityAudioDecoderChild lost the ability to work
*without* a GPU process. This patch remedies that by creating an
alternate connection for the endpoint, modeled after the code in
RDDProcessManager.
Differential Revision: https://phabricator.services.mozilla.com/D223015
At some point, UtilityAudioDecoderChild lost the ability to work
*without* a GPU process. This patch remedies that by creating an
alternate connection for the endpoint, modeled after the code in
RDDProcessManager.
Differential Revision: https://phabricator.services.mozilla.com/D223015
After this change, the fork server no longer uses a Dup2Sequence to set
fixed FD offsets when starting child processes, instead using the new
geckoargs system.
Because this was pretty disruptive to thow the fork server works and was
previously integrated into LaunchApp, the forkserver code has generally been
moved out of the chromium codebase, and inlined into the ForkServer files.
As the linux chroot sandbox code needs to run the chroot server from a process
created during forking, it is now being sent down to the fork server
separately, though the child end of the pipe is still being passed using
GeckoArgs.
Finally, the primary IPC pipe used by the fork server is also changed to
be passed using geckoargs into the fork server, and the fork server
being used is made more explicit in GeckoChildProcessHost, as launching
using the fork server now requires different arguments than launching
normally (due to needing to pass down the ChildProcessArgs).
Differential Revision: https://phabricator.services.mozilla.com/D221380
The code which decodes the XPC bootstrap message hasn't landed into
mozilla-central yet, so only the serializing side in GeckoChildProcessHost is
updated here.
Differential Revision: https://phabricator.services.mozilla.com/D221379
This changes how file descriptors are passed to Android child processes to
support the new ChildProcessArgs model. Instead of explicit lists of FDs to pass
around, a single array of FDs is passed from the parent process into the child
service and then passed into GeckoArgs.
Differential Revision: https://phabricator.services.mozilla.com/D221378