6893 Commits

Author SHA1 Message Date
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
David Parks
e44992d159 Bug 1696382: Document IPDL [Nested] Annotations r=gerard-majax,nika
[Nested=Foo] allows message-thread-focused synchronous IPC communication.  Its use is discouraged.

Differential Revision: https://phabricator.services.mozilla.com/D135276
2022-01-13 00:10:21 +00:00
David Parks
537f03caa7 Bug 1696382: Add new process documentation r=gerard-majax
Includes docs on core process components and examples of new top-level actors and the "first" actors that help with process bootstrapping.

Differential Revision: https://phabricator.services.mozilla.com/D132314
2022-01-13 00:10:21 +00:00
David Parks
1195985bf3 Bug 1696382: Add IPC in-tree docs r=nika,gerard-majax,ipc-reviewers
Includes docs for IPDL actors and protocols.

Differential Revision: https://phabricator.services.mozilla.com/D121871
2022-01-13 00:10:20 +00:00
Alexandre Lissy
161f130b0a Bug 1731890 - Adding Utility process with basic sandbox r=agi,nika,bobowen
Differential Revision: https://phabricator.services.mozilla.com/D126297
2022-01-12 20:52:58 +00:00
Nika Layzell
f2916bb759 Bug 1737828 - Avoid the main thread when starting PBackground, r=asuth,ipc-reviewers,necko-reviewers,kershaw,handyman
This patch avoids requiring the main thread to create PBackground instances by
instead using a background starter TaskQueue, and sending messages from a
PBackgroundStarter actor hosted on that thread to the target background thread
directly. On the background thread, the relevant metadata is already registered
and present in the BackgroundStarterParent actor allowing the main thread in
both processes to be bypassed completely.

Various tasks remain bound to the main thread, such as PBackground cleanup and
async steps involved in PBackground creation.

This patch also unifies the in-process and cross-process PBackground codepaths,
allowing in-process PBackground creation to bypass the main thread as well, and
removing the need for a main thread event target from
GetOrCreateForCurrentThread().

Differential Revision: https://phabricator.services.mozilla.com/D129705
2022-01-10 20:09:14 +00:00
Nika Layzell
7a827c900c Bug 1631402 - Remove expired IPC_MAIN_THREAD_LATENCY probes, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D135154
2022-01-07 20:33:01 +00:00
Noemi Erli
0950d681d3 Backed out changeset 686ae9e71a9c (bug 1631402) for causing build bustage in MessageChannel.cpp 2022-01-06 00:45:48 +02:00
Jed Davis
0dd45b5bf8 Bug 1746289 - Deprecate the IPDL intr keyword and tag legacy uses in tests. r=nika
At this point, the only remaining uses of `intr` are in test files.  To
avoid the possibility of adding any more (until such time as we deal
with the tests and can get rid of `intr` entirely), this patch requires
a `[LegacyIntr]` attribute on any declaration that uses them, and tags
all the uses in tests with that attribute.

Differential Revision: https://phabricator.services.mozilla.com/D133964
2022-01-05 22:04:46 +00:00
Nika Layzell
4ae3066937 Bug 1631402 - Remove expired IPC_MAIN_THREAD_LATENCY probes, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D135154
2022-01-05 21:20:15 +00:00
Jens Stutte
ef05e1f955 Bug 1747380: Always include channel name and task name while reporting channel errors. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D134613
2022-01-05 16:22:19 +00:00
Mike Hommey
1acc37c7a6 Bug 1747756 - Move Windows system libraries from LIBS to moz.build. r=firefox-build-system-reviewers,mhentges
While mingw builds don't require user32 and advapi32 explicitly, it doesn't
hurt for them to be there (and they're required for clang-cl build).
Likewise, while clang-builds don't require uuid and userenv explicitly
because they're pulled in via #pragmas in the source code, mingw doesn't
support those #pragmas and needs them explicitly, which doesn't hurt the
clang-cl builds.

Differential Revision: https://phabricator.services.mozilla.com/D134737
2021-12-30 20:56:43 +00:00
Iulian Moraru
b469802d84 Backed out changeset 7f9b4b6191ad (bug 1747756) for causing multiple failures. CLOSED TREE 2021-12-30 01:59:26 +02:00
Mike Hommey
cb50a5444f Bug 1747756 - Move Windows system libraries from LIBS to moz.build. r=firefox-build-system-reviewers,mhentges
While mingw builds don't require user32 and advapi32 explicitly, it doesn't
hurt for them to be there (and they're required for clang-cl build).
Likewise, while clang-builds don't require uuid and userenv explicitly
because they're pulled in via #pragmas in the source code, mingw doesn't
support those #pragmas and needs them explicitly, which doesn't hurt the
clang-cl builds.

Differential Revision: https://phabricator.services.mozilla.com/D134737
2021-12-29 22:18:52 +00:00
Mike Hommey
004902cee7 Bug 1747228 - Don't link mozsandbox into plugin-container or firefox. r=firefox-build-system-reviewers,andi
In optimized builds, it's stripped out at link time, because it's been
unused since bug 1505445 moved the sandbox initialization into libxul.
But in non-optimized builds, it's not, and that pulls in CoreFoundation
symbols, but we're not linking plugin-container against CoreFoundation
(we do link firefox to it for other uses).

This wasn't a problem before bug 1747160 because we were linking
everything against CoreFoundation (indirectly).

Differential Revision: https://phabricator.services.mozilla.com/D134587
2021-12-23 20:31:14 +00:00
Mike Hommey
fce6eb7d83 Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-23 20:29:07 +00:00
Cristian Tuns
e1e31e01f2 Backed out 2 changesets (bug 1747165) for causing nightly blockers(bustages) a=backout
Backed out changeset 4b1ab0915c94 (bug 1747165)
Backed out changeset 96043d814772 (bug 1747165)
2021-12-23 08:00:54 -05:00
Mike Hommey
b55194a16f Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-22 23:56:24 +00:00
Steve Fink
543df99e4e Bug 1672121 - Stop sGCRunner GC slice if the IdleTaskRunnerTask gets a RequestInterrupt() call r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D109631
2021-12-22 18:06:06 +00:00
Paul Bone
4c04be4f33 Bug 1745269 - Remove the GC_WAIT_FOR_IDLE_* telemetry r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D134114
2021-12-20 22:12:08 +00:00
Dana Keeler
e06d1bceee Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,glandium,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Depends on D130820

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-18 01:30:24 +00:00
Jonathan Watt
ac90ddff59 Bug 1745452 - Remove the print progress dialog code. r=mstriemer,bobowen,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D133500
2021-12-16 15:12:33 +00:00
Butkovits Atila
7d46682c0e Backed out changeset 51d7c5d96ceb (bug 1745452) for causing failures at browser_all_files_referenced.js. CLOSED TREE 2021-12-16 15:13:34 +02:00
Jonathan Watt
f2d22001b0 Bug 1745452 - Remove the print progress dialog code. r=mstriemer,bobowen,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D133500
2021-12-16 11:45:59 +00:00
Randell Jesup
c075d29d20 Bug 1625161: Move ASSERT_UNLESS_FUZZING() to mfbt and hook into FUZZING r=glandium,decoder
Differential Revision: https://phabricator.services.mozilla.com/D133166
2021-12-16 04:13:48 +00:00
Cosmin Sabou
045a43b2c8 Backed out 2 changesets (bug 1712837) for causing an increase in crashes (bug 1735798). a=backout
Backed out changeset 51773d1ab7b5 (bug 1712837)
Backed out changeset 97b0a77e4ce7 (bug 1712837)
2021-12-15 12:24:03 +02:00
Kelsey Gilbert
c3603037db Bug 1746111 - (Re)serialize WebRTC frame SurfaceDescriptorBuffers for convert-and-upload on WebGLParent. r=gfx-reviewers,nika,lsalzman
Also generally de-inline (WebGLParent::TexImage not DispatchCommand)
TexImage(SurfaceDescriptor).

Differential Revision: https://phabricator.services.mozilla.com/D132851
2021-12-15 01:54:21 +00:00
Dana Keeler
fe0468b14a Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-13 23:59:08 +00:00
Cristian Tuns
b00f575d28 Merge mozilla-central to autoland on a CLOSED TREE 2021-12-10 09:41:08 -05:00
Cristian Tuns
9ad5101118 Backed out changeset 5396b58ddae7 (bug 1712837) for causing Android ARMv7 build bustages. a=backout 2021-12-10 09:35:39 -05:00
Andrew Osmond
663576a9e6 Bug 1736177 - Part 9. Add plumbing to snapshot worker canvas contexts from the main thread. r=jgilbert,ipc-reviewers,nika
Right now, if we wanted to get a snapshot of an OffscreenCanvas context
on a worker thread from the main thread, we would need to block the main
thread on the worker thread, and from the worker thread, issue a sync
IPC call get the front buffer snapshot.

This patch adds an alternative which allows the main thread to go
directly to the canvas owning thread in the compositor process to get
the snapshot, thereby bypassing the worker thread in content process
entirely. All it needs as the unique ID of the CanvasManagerChild
instance, and the protocol ID of the WebGLChild instance.

This will be used for Firefox screenshots, New Tab tiles, and printing.

Differential Revision: https://phabricator.services.mozilla.com/D130785
2021-12-10 02:57:55 +00:00
Andrew Osmond
c439ab6cd3 Bug 1738971 - Part 3. Rework VsyncChild to allow multiple implementations. r=gfx-reviewers,jgilbert
VsyncChild is main thread only, and we would like to reuse PVsync on the
worker threads via PBackgroundChild which already implements it. This
patch does the necessary refactoring to have multiple implementations of
PVsyncChild.

Differential Revision: https://phabricator.services.mozilla.com/D130264
2021-12-10 02:57:50 +00:00
Dana Keeler
c52192ebff Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-10 00:24:49 +00:00
Csoregi Natalia
1c7cae16d7 Backed out 17 changesets (bug 1738971, bug 1736177) for bp-hybrid failures and others. CLOSED TREE
Backed out changeset 828633114de2 (bug 1736177)
Backed out changeset 5be8557c4721 (bug 1736177)
Backed out changeset 49f8b4205a46 (bug 1736177)
Backed out changeset 2610d4464ad5 (bug 1736177)
Backed out changeset 6d6c78c31c28 (bug 1736177)
Backed out changeset d55f1ee88bb9 (bug 1736177)
Backed out changeset bf588f8ffcf1 (bug 1736177)
Backed out changeset 86f6f6d86c6c (bug 1736177)
Backed out changeset f400c75c5829 (bug 1736177)
Backed out changeset 4a34124d5f4e (bug 1736177)
Backed out changeset 70aff7fcd001 (bug 1736177)
Backed out changeset db2347ee8147 (bug 1736177)
Backed out changeset 3dde5ddb65e5 (bug 1738971)
Backed out changeset 894ba6b7b68f (bug 1738971)
Backed out changeset dc4503052cf1 (bug 1738971)
Backed out changeset d9aef3e9797e (bug 1738971)
Backed out changeset 562a1e8e5ac3 (bug 1738971)
2021-12-10 01:13:23 +02:00
Andrew Osmond
8077b44a0c Bug 1736177 - Part 9. Add plumbing to snapshot worker canvas contexts from the main thread. r=jgilbert,ipc-reviewers,nika
Right now, if we wanted to get a snapshot of an OffscreenCanvas context
on a worker thread from the main thread, we would need to block the main
thread on the worker thread, and from the worker thread, issue a sync
IPC call get the front buffer snapshot.

This patch adds an alternative which allows the main thread to go
directly to the canvas owning thread in the compositor process to get
the snapshot, thereby bypassing the worker thread in content process
entirely. All it needs as the unique ID of the CanvasManagerChild
instance, and the protocol ID of the WebGLChild instance.

This will be used for Firefox screenshots, New Tab tiles, and printing.

Differential Revision: https://phabricator.services.mozilla.com/D130785
2021-12-09 19:25:28 +00:00
Andrew Osmond
9788a2fa0a Bug 1738971 - Part 3. Rework VsyncChild to allow multiple implementations. r=gfx-reviewers,jgilbert
VsyncChild is main thread only, and we would like to reuse PVsync on the
worker threads via PBackgroundChild which already implements it. This
patch does the necessary refactoring to have multiple implementations of
PVsyncChild.

Differential Revision: https://phabricator.services.mozilla.com/D130264
2021-12-09 19:25:23 +00:00
Andreea Pavel
041f6f706d Backed out 2 changesets (bug 1712837) for win build bustages on a CLOSED TREE
Backed out changeset e754af875d57 (bug 1712837)
Backed out changeset 020eaab241a8 (bug 1712837)
2021-12-07 02:21:09 +02:00