зеркало из https://github.com/mozilla/gecko-dev.git
f5d6df8915
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 |
||
---|---|---|
.. | ||
app | ||
chromium | ||
contentproc | ||
docs | ||
glue | ||
gtest | ||
ipdl | ||
mscom | ||
testshell | ||
moz.build | ||
pull-chromium.py |