Commit Graph

6829 Commits

Author SHA1 Message Date
Alexandre Lissy
5e6de8828e Bug 1754572 - Ensure we stop utility process after running tests r=nika
Differential Revision: https://phabricator.services.mozilla.com/D138484
2022-02-11 20:48:58 +00:00
Alexandre Lissy
d7db5c7bd5 Bug 1754572 - Add a delayed kill test r=nika
Differential Revision: https://phabricator.services.mozilla.com/D138483
2022-02-11 20:48:58 +00:00
Alexandre Lissy
8dc1a247ac Bug 1754572 - Fix hard_kill test by waiting on process death r=nika
Differential Revision: https://phabricator.services.mozilla.com/D138482
2022-02-11 20:48:57 +00:00
Alexandre Lissy
4e57affeb7 Bug 1754572 - Correct error handling in UtilityProcessTest r=nika
Differential Revision: https://phabricator.services.mozilla.com/D138356
2022-02-11 20:48:57 +00:00
Florian Quèze
7b45ca4063 Bug 1754519 - Add missing profiler_thread_sleep annotations, r=gerald,necko-reviewers,kershaw.
Differential Revision: https://phabricator.services.mozilla.com/D138341
2022-02-11 15:19:46 +00:00
Randell Jesup
04eee57501 Bug 1748759: ipc cleanup r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D135184
2022-02-10 22:01:17 +00:00
Bob Owen
e82a8ce887 Bug 1695556 p3: Add file tests for content process sandbox. r=handyman,ipc-reviewers,jld
Depends on D135693

Differential Revision: https://phabricator.services.mozilla.com/D135694
2022-02-10 16:56:02 +00:00
Bob Owen
792f2eb822 Bug 1695556 p2: Stop resolving symlinks for content sandbox rules. r=handyman
Depends on D135692

Differential Revision: https://phabricator.services.mozilla.com/D135693
2022-02-10 16:56:02 +00:00
Alexandre Lissy
c9affa0ba0 Bug 1753758 - Add crash reporting test for UtilityProcess r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D137908
2022-02-09 22:07:33 +00:00
Nika Layzell
dabb46c84d Bug 1736371 - Default new actors to be refcounted, r=alwu,media-playback-reviewers,mccr8
The changes to ipdl actors were mechanical, and largely automated using
a script.

Differential Revision: https://phabricator.services.mozilla.com/D137237
2022-02-09 17:29:47 +00:00
Nika Layzell
fca4b089dd Bug 1752444 - Part 3: Mention the new attributes in the ipdl docs, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D137228
2022-02-09 17:29:46 +00:00
Nika Layzell
91ec85c593 Bug 1752444 - Part 2: Rewrite direct_call.py protocols to use {Parent,Child}Impl attributes, r=ipc-reviewers,media-playback-reviewers,alwu,mccr8
This is a mechanical change which was performed by a script based on the
contents of direct_call.py, and then manually checked over to fix
various rewriting bugs caused by my glorified sed script. See the
previous part for more context on the change.

Differential Revision: https://phabricator.services.mozilla.com/D137227
2022-02-09 17:29:46 +00:00
Nika Layzell
261ef74ea4 Bug 1752444 - Part 1: Add {Parent,Child}Impl attributes to ipdl, r=ipc-reviewers,mccr8
These attributes replace the previous direct_call.py table which
specified how to locate the concrete implementation of a protocol and
whether it should use a virtual implementation or not.

They work by specifying the concrete type for an actor, and disabling
the automatic inclusion of the implementation's header file, which can
be included explicitly with an `include "";` statement. This allows
customizing both the name and include path of the concrete
implementation of an interface.

Differential Revision: https://phabricator.services.mozilla.com/D137226
2022-02-09 17:29:45 +00:00
Nika Layzell
9919099425 Bug 1738734 - Directly pass around handles rather than using TransportDescriptor, r=jld,media-playback-reviewers,alwu
This simplifies the logic around descriptors significantly, which is
especially useful considering how few places use the type. There is a
small change required on Windows to create the NamedPipe directly and
transfer around each end's handle, rather than connecting between
processes after the fact.

A named pipe has to be used, rather than an anonymous pipe, as
bidirectional communication is required.

Differential Revision: https://phabricator.services.mozilla.com/D130381
2022-02-08 23:53:45 +00:00
Nika Layzell
486c5fc2c4 Bug 1751071 - Correctly forward-declare/import included but unused types in ipdlh headers, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D137164
2022-02-08 23:53:44 +00:00
Alexandre Lissy
443945e8ff Bug 1753642 - Ensure UtilityProcessHost cleanup in unexpected shutdown r=nika
Differential Revision: https://phabricator.services.mozilla.com/D137876
2022-02-08 17:48:14 +00:00
Alexandre Lissy
08550b853b Bug 1753642 - Add test of hard kill and clean shutdown for UtilityProcess r=nika
Differential Revision: https://phabricator.services.mozilla.com/D137875
2022-02-08 17:48:13 +00:00
Dan Minor
01831135cc Bug 1751936 - Update users of SharedPreferenceSerializer to pass ShouldSyncPreference; r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D137476
2022-02-07 16:44:18 +00:00
Dan Minor
5d61a2312b Bug 1751936 - Add mShouldSerializeFn to SharedPreferenceSerializer; r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D137475
2022-02-07 16:44:18 +00:00
Alexandre Lissy
27d27fe7e1 Bug 1749809 - Basic memory reporting test for UtilityProcess r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D137774
2022-02-04 21:05:50 +00:00
Alexandre Lissy
fa0bc5887d Bug 1749809 - Provide way for querying UtilityProcessManager without creating one instance r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D137888
2022-02-04 21:05:49 +00:00
Alexandre Lissy
f9a5917710 Bug 1749809 - Basic profiler test for UtilityProcess r=florian
Differential Revision: https://phabricator.services.mozilla.com/D137752
2022-02-04 21:05:49 +00:00
Cristian Tuns
2d0d8e4b0f Backed out 2 changesets (bug 1749809) for causing reftest failures on UtilityProcessManager.cpp CLOSED TREE
Backed out changeset 78a4a462c698 (bug 1749809)
Backed out changeset 4f55d4cc7b8c (bug 1749809)
2022-02-04 13:02:11 -05:00
Alexandre Lissy
5a84cf8dc4 Bug 1749809 - Basic memory reporting test for UtilityProcess r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D137774
2022-02-04 15:17:26 +00:00
Alexandre Lissy
9761993a72 Bug 1749809 - Basic profiler test for UtilityProcess r=florian
Differential Revision: https://phabricator.services.mozilla.com/D137752
2022-02-04 15:17:26 +00:00
Sylvestre Ledru
caaedeee98 Bug 1753413 - fx doc: Remove whitespaces, trailing lines & windows CR r=andi,perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D137741
2022-02-03 18:34:58 +00:00
Jed Davis
8238831a2c Bug 1658474 - Remove the blocking mode of IPC's KillProcess function. r=mccr8,media-playback-reviewers,alwu,bryce
`base::KillProcess`, with the `wait` parameter set to true, does a
bounded blocking wait for the process to exit by polling and sleeping in
a loop, with ad-hoc parameters.  The only user of that case is the Gecko
Media Plugin code, which doesn't actually need it as discussed in bug
(comments 4-6); also, currently it's blocking the IPC I/O thread in the
parent process, which is not good for browser responsiveness.

Accordingly, this patch deletes that code and removes the parameter.

Differential Revision: https://phabricator.services.mozilla.com/D136662
2022-02-02 21:50:01 +00:00
Bob Owen
48e1837edd Bug 1751367: Delay loading winmm.dll, so it loads after COM initialization. r=cmartin,media-playback-reviewers,alwu
This is to prevent user32.dll from loading before COM initialization on earlier
version of windows.

Differential Revision: https://phabricator.services.mozilla.com/D136936
2022-02-02 13:43:51 +00:00
Marian-Vasile Laza
944f53b58d Backed out 2 changesets (bug 1751367, bug 1151941) for causing marionette test failures. CLOSED TREE
Backed out changeset 0b12f1bb498a (bug 1751367)
Backed out changeset bba7c74dafae (bug 1151941)
2022-02-01 19:47:30 +02:00
Bob Owen
b9d6b5e60a Bug 1751367: Delay loading winmm.dll, so it loads after COM initialization. r=cmartin,media-playback-reviewers,alwu
This is to prevent user32.dll from loading before COM initialization on earlier
version of windows.

Differential Revision: https://phabricator.services.mozilla.com/D136936
2022-02-01 13:31:33 +00:00
Sandor Molnar
6035b5cf95 Backed out changeset ba6624225635 (bug 1738734) for causing build bustages in ipc/PUtilityProcessParent. 2022-02-01 00:57:12 +02:00
Nika Layzell
c45d6350d4 Bug 1738734 - Directly pass around handles rather than using TransportDescriptor, r=jld,media-playback-reviewers,alwu
This simplifies the logic around descriptors significantly, which is
especially useful considering how few places use the type. There is a
small change required on Windows to create the NamedPipe directly and
transfer around each end's handle, rather than connecting between
processes after the fact.

A named pipe has to be used, rather than an anonymous pipe, as
bidirectional communication is required.

Differential Revision: https://phabricator.services.mozilla.com/D130381
2022-01-31 22:26:05 +00:00
Alexandre Lissy
c49224c91a Bug 1745173 - Add FOG to UtilityProcess r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D133633
2022-01-31 20:46:49 +00:00
Alexandre Lissy
1a9d26eeea Bug 1751177 - Add browser chrome tests for UtilityProcess r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D136477
2022-01-31 20:46:48 +00:00
Gabriele Svelto
ff9bbb3d27 Bug 1678152 - Catch all stack overflows on Linux r=jld
This patch adds a library that contains an interposer function for
pthread_create(). The interposer will setup an alternate signal stack to
handle crashes - thus enabling us to catch stack overflows - and then call the
real pthread_create() function. Since the interposer needs to appear in the
linker's search order before libpthread we manually link it into firefox,
plugin-container and xpcshell's executables ASAP.

Differential Revision: https://phabricator.services.mozilla.com/D132736
2022-01-28 07:29:26 +00:00
Nika Layzell
f17ea9075a Bug 1751047 - Remove support for intr messages from IPC, r=ipc-reviewers,mccr8
All uses of the intr message type have been removed from the tree, and the only
remaining uses are in IPDL tests, which currently do not test the IPDL runtime.
This test fully removes support for intr messages from the MessageChannel
interface.

Differential Revision: https://phabricator.services.mozilla.com/D136500
2022-01-27 16:42:13 +00:00
Dana Keeler
161c96d597 Bug 1751078 - avoid passing an extra copy of the server certificate's bytes during verification r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D136680
2022-01-26 21:23:50 +00:00
Jed Davis
28020f697f Bug 1741152 - Log IPC fork() failures on non-debug builds. r=nika
Note that `CHROMIUM_LOG` with level `WARNING` or higher will log by
default (via `NS_DebugBreak`) on all build types.

Differential Revision: https://phabricator.services.mozilla.com/D136950
2022-01-26 20:31:07 +00:00
Alexandre Lissy
bc59ee68ea Bug 1751229 - Add Utility into Process Model doc r=nika
Differential Revision: https://phabricator.services.mozilla.com/D136578
2022-01-25 23:47:13 +00:00
Nika Layzell
09d88e5fd2 Bug 1749059 - Remove Quantum DOM support from IPDL, r=ipc-reviewers,mccr8
This is no longer necessary as the Quantum DOM project is no longer
happening, and removing support simplifies various components inside of
IPDL.

As some code used the support to get a `nsISerialEventTarget` for an
actor's worker thread, that method was replaced with a method which
instead pulls the nsISerialEventTarget from the MessageChannel and
should work on all actors.

Differential Revision: https://phabricator.services.mozilla.com/D135411
2022-01-25 20:29:46 +00:00
Jens Stutte
197778f427 Bug 1748852: Assert on IPC_FAIL unless fuzzing. r=ipc-reviewers,nika,media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D135238
2022-01-20 15:42:57 +00:00
Alexandre Lissy
c13cf7c24a Bug 1740268 - Augment IPC process docs with proper bookkeeping r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D135991
2022-01-20 07:55:13 +00:00
Norisz Fay
eaab604790 Backed out changeset 1f8090459465 (bug 1748852) for causing assertion failures on ProtocolUtils.cpp 2022-01-19 13:21:01 +02:00
Jens Stutte
e31c9772ef Bug 1748852: Assert on IPC_FAIL unless fuzzing. r=ipc-reviewers,nika,media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D135238
2022-01-19 06:55:25 +00:00
Mike Hommey
50beacb53b Bug 1750168 - Align the size of buffers given to WriteBytesZeroCopy. r=nika
Also ensure Copier::Copy receives aligned pointers (in debug builds).

Differential Revision: https://phabricator.services.mozilla.com/D135985
2022-01-14 22:54:26 +00:00
Alexandre Lissy
e7da19d589 Bug 1750112 - Free observer even when no utility process exists r=nika
This can happen when some code is probing the UtilityProcessManager but
does not actually launch a process, as exposed by the pending patch to
enable FOG.

Differential Revision: https://phabricator.services.mozilla.com/D135941
2022-01-14 20:59:20 +00:00
Nika Layzell
2e25ca863b Bug 1749744 - Handle re-creating PBackgroundStarter, r=handyman,kershaw
This is possible if the socket process bridge ends up being restarted,
so needs to be handled as an edge-case. The approach taken here is to
tightly couple the task queue, pid, and BackgroundStarterChild instances
so that they can be swapped out at runtime whenever InitStarter is
called.

There is no test in the current patch as it is apparently still
unsupported to restart the socket process after a crash.

Differential Revision: https://phabricator.services.mozilla.com/D135746
2022-01-13 23:58:46 +00:00
Alexandre Lissy
a32e438476 Bug 1749895 - Add missing MOZ_SANDBOX guard for gtest UtilityProcess r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D135873
2022-01-13 17:17:46 +00:00
Noemi Erli
d8599de50c Backed out changeset a07c86e0a2ef (bug 1749895) as per dev's request CLOSED TREE 2022-01-13 19:13:03 +02:00
Alexandre Lissy
f60c1538e6 WIP: Bug 1749895 - Add missing MOZ_SANDBOX guard for gtest UtilityProcess r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D135873
2022-01-13 17:00:29 +00:00