Fix the increasingly inaccurately named ProcessSelector::ANY_PROCESS
Categories
(Core :: XPCOM, task)
Tracking
()
People
(Reporter: mccr8, Unassigned)
References
Details
ProcessSelector has a value ANY_PROCESS, which I assume was accurate back in the e10s days, but since then people have kept piling on their own new types of processes running a minimal XPCOM that wants to opt into components more selectively, and thus don't want to be counted as "any process".
However, there are a bunch of XPCOM services they do want, so we have have the selector value ALLOW_IN_GPU_RDD_VR_SOCKET_AND_UTILITY_PROCESS (soon to become ALLOW_IN_GPU_RDD_VR_SOCKET_UTILITY_AND_GMPLUGIN_PROCESS in bug 1845946) for when we really do want it to be loaded in all processes, which is used 30 times.
By contrast, ANY_PROCESS is only used about 8 times.
After bug 1845946, based on GeckoProcessTypes.h it looks like the process types that ANY_PROCESS covers is Default, Content, RemoteSandboxBroker, and ForkServer. Do the latter two actually want all XPCOM components or maybe they don't load XPCOM?
IPDLUnitTest has a weird carve-out where it is covered by ALLOW_IN_GPU_RDD_VR_SOCKET_UTILITY_AND_GMPLUGIN_PROCESS but not ANY_PROCESS, but otherwise we shall not speak its name.
Anyways, maybe we can rename ANY_PROCESS to FULL_XPCOM_PROCESS or something and make ALLOW_IN_GPU_RDD_VR_SOCKET_UTILITY_AND_GMPLUGIN_PROCESS into an actual ANY_PROCESS.
| Reporter | ||
Comment 1•2 years ago
|
||
Jed, do you know what the XPCOM situation is for RemoteSandboxBroker and ForkServer processes? Do they use minimal XPCOM, full XPCOM, or no XPCOM?
Comment 2•2 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #1)
Jed, do you know what the XPCOM situation is for RemoteSandboxBroker and ForkServer processes? Do they use minimal XPCOM, full XPCOM, or no XPCOM?
Neither the remote sandbox broker nor fork server start xpcom at all. (the fork server needs to have no background threads so it can fork, and the RSB doesn't start XPCOM or minimal XPCOM).
I think ANY_PROCESS should be FULL_XPCOM_PROCESS or something like that, because it's just Default and Content processes. The complex combo ones could be simplified to perhaps MINIMAL_XPCOM_PROCESS or actually ANY_PROCESS.
| Reporter | ||
Comment 3•2 years ago
|
||
Yeah, that makes sense. It might be worth adding some asserts in here so people don't start running XPCOM in a new kind of process without setting up the component manager stuff properly, like I'm guessing happened with the GMPPlugin process.
| Reporter | ||
Comment 4•2 years ago
|
||
(In reply to Nika Layzell [:nika] (ni? for response) from comment #2)
I think
ANY_PROCESSshould beFULL_XPCOM_PROCESSor something like that, because it's just Default and Content processes. The complex combo ones could be simplified to perhapsMINIMAL_XPCOM_PROCESSor actuallyANY_PROCESS.
Maybe ANY_XPCOM_PROCESS? I think that makes it a little less ambiguous when you come across it in isolation, or maybe it is just me that is confused.
Description
•