gecko-dev/ipc/ipdl
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
..
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
test Bug 1760244 - Make badProtocolInclude syntactically valid. r=nika 2022-03-18 17:09:33 +00:00
Makefile.in Bug 1670357 - Remove `make` targets for cleaning: `clean`, `realclean`, `clobber`, `distclean`, `clobber_all`, `everything` r=firefox-build-system-reviewers,mhentges 2020-10-15 20:37:18 +00:00
ipdl.py Bug 1346446 - Add a DataPipe shared memory pipe type, r=ipc-reviewers,handyman 2022-02-14 23:59:35 +00:00
message-metadata.ini Bug 1727489 - Remove PLayerTransaction. r=jrmuizel,jgilbert 2021-08-26 04:59:57 +00:00
moz.build Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi 2021-12-23 20:29:07 +00:00
msgtype-components
sync-messages.ini Bug 1754448 - Add basic testing for snapshot re-using; r=dom-storage-reviewers,webidl,asuth,jari,ipc-reviewers,mccr8 2022-03-09 09:43:09 +00:00