gecko-dev/ipc
Nika Layzell 5e08e6891a Bug 1757802 - Don't keep alive Shmem shared memory regions on IProtocol, r=ipc-reviewers,jld
With this new approach, Shmem instances will now have their handles
transferred inline within messages as attachments, rather than being
associated with their actors and sent in separate messages.

This has a few advantages:

* The implementation is much simpler
* Releasing all references to a Shmem will automatically destroy it by
  RAII, rather than leaking the shared memory region until the toplevel
  actor is destroyed, removing the need for types like RaiiShmem.
* This allows re-transmitting Shmem instances to another process, as we
  don't close the shared memory region handle upon receiving it.

But also has a disadvantage that because we keep alive the shared memory
region's handle until the shmem is destroyed, so that it can be
re-transmitted, we may end up using more FDs or HANDLEs while running.

This patch intentionally doesn't change or simplify callsites, removing
APIs like RaiiShmem, in order to make it easier to revert if this causes
issues on platforms like Linux due to FD exhaustion. If we don't run
into increased resource exhaustion problems, we can make these changes
in a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D140211
2022-04-18 19:26:15 +00:00
..
app Bug 1678152 - Catch all stack overflows on Linux r=jld 2022-01-28 07:29:26 +00:00
chromium Bug 1761547 - Avoid the deadlock detector for mojo Port mutexes, r=ipc-reviewers,mccr8 2022-04-13 16:11:51 +00:00
contentproc
docs Bug 1761213 - Process bookkeeping needs to cover about:processes r=handyman,fluent-reviewers,flod 2022-03-24 21:11:19 +00:00
glue Bug 1757802 - Don't keep alive Shmem shared memory regions on IProtocol, r=ipc-reviewers,jld 2022-04-18 19:26:15 +00:00
gtest Bug 1754037 - Part 3a: Manual changes to new ParamTraits API, r=ipc-reviewers,mccr8 2022-03-04 15:39:40 +00:00
ipdl Bug 1757802 - Don't keep alive Shmem shared memory regions on IProtocol, r=ipc-reviewers,jld 2022-04-18 19:26:15 +00:00
mscom Bug 1762490 - Annotate mscom/Interceptor to silence warnings. r=Jamie,jesup 2022-04-14 02:01:42 +00:00
testshell Bug 1736371 - Default new actors to be refcounted, r=alwu,media-playback-reviewers,mccr8 2022-02-09 17:29:47 +00:00
moz.build Bug 1696382: Add IPC in-tree docs r=nika,gerard-majax,ipc-reviewers 2022-01-13 00:10:20 +00:00
pull-chromium.py