Clean up locking in MessageChannel
Categories
(Core :: IPC, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox92 | --- | fixed |
People
(Reporter: nika, Assigned: nika)
Details
Attachments
(8 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
| Assignee | ||
Comment 1•4 years ago
|
||
This makes things generally more clear, and avoids a long list of initializers
in the MessageChannel constructor. In addition, some fields which are never
modified are marked as const.
| Assignee | ||
Comment 2•4 years ago
|
||
Now that PortLink is the only MessageLink implementation, it is no longer
necessary to support sharing a single RefCountedMonitor between multiple
MessageChannels, meaning that we can construct the monitor directly in the
MessageChannel constructor. The monitor still needs to be refcounted due to
being used by the PortLink as part of the listener implementation.
| Assignee | ||
Comment 3•4 years ago
|
||
This method is never called.
| Assignee | ||
Comment 4•4 years ago
|
||
This simplifies some of the reasoning about when to hold locks by holding it
when setting all monitor-guarded fields.
| Assignee | ||
Comment 5•4 years ago
|
||
This state was only used by the ProcessLink MessageLink implementation, and no
longer exists with the new PortLink implementation, so can be removed.
| Assignee | ||
Comment 6•4 years ago
|
||
This should make the logic around clearing a MessageChannel more obviously
correct by holding the mutex when accessing fields which are traditionally
guarded by the mutex. These lock calls shouldn't introduce performance issues
as the lock should be uncontended.
| Assignee | ||
Comment 7•4 years ago
|
||
This comment refers to the old ProcessLink implementation, and was missed when
that implementation was removed.
| Assignee | ||
Comment 8•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 10•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/b7c5eb05364c
https://hg.mozilla.org/mozilla-central/rev/68e1d5aaf856
https://hg.mozilla.org/mozilla-central/rev/6c7b991eb21d
https://hg.mozilla.org/mozilla-central/rev/cc1b04b6f68c
https://hg.mozilla.org/mozilla-central/rev/bb78618b5c81
https://hg.mozilla.org/mozilla-central/rev/105c1a4bebae
https://hg.mozilla.org/mozilla-central/rev/1b5b806c2f73
https://hg.mozilla.org/mozilla-central/rev/766d12d3f3fe
Description
•