gecko-dev/ipc/chromium
Nika Layzell f5d6df8915 Bug 1792474 - Part 4: Avoid the IO thread hop when sending IPC messages, r=ipc-reviewers,jld
This involves some changes to IPC::Channel::ChannelImpl on all platforms in
order to ensure that they are threadsafe.

1. The ChannelImpl is now internally refcounted, making the correctness
   of parts of its lifecycle more clear.
2. Members of the channel are all annotated with `MOZ_GUARDED_BY` for either
   the `io_thread_` or `mutex_` depending on if they are required in order to
   send a message. This gives us some static checks that we won't deadlock.
3. The `closed_` field is removed, as thanks to the mutex, `pipe_` can now be
   checked directly from any thread instead. This reduces the risk of
   forgetting to update `closed_`.
4. `NodeChannel` now calls `Send()` without dispatching, which also required
   updating some other members to also be accessible from any thread, including
   changes to allow asynchronously reporting a channel error when `Send()`
   fails.
5. The Windows handling for `Connect()` was made more thread-safe to queue
   calls to `Send()` performed before `Connect()` returns. The posix
   `Connect()` handler already did this.

Differential Revision: https://phabricator.services.mozilla.com/D158162
2022-10-07 01:51:29 +00:00
..
gtest Bug 1775148 - Cleanup ipc/ includes r=sylvestre 2022-06-23 15:49:57 +00:00
src Bug 1792474 - Part 4: Avoid the IO thread hop when sending IPC messages, r=ipc-reviewers,jld 2022-10-07 01:51:29 +00:00
chromium-config.mozbuild Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin 2021-06-09 04:56:48 +00:00
moz.build Bug 1783240 - Part 2: Automatically serialize large blocks of binary data in shared memory, r=ipc-reviewers,jld 2022-09-28 19:25:12 +00:00