EventSource's locking regime is inconsistent
Categories
(Core :: DOM: Networking, defect, P2)
Tracking
()
People
(Reporter: ytausky, Assigned: jstutte)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(2 obsolete files)
EventSource
's implementation has a mutex with a very wrong comment attached to it. Several other members of both EventSource
and EventSourceImpl
are potentially accessed from two different threads and usage of the mutex is inconsistent.
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
Some code in EventSource's implementation was accessing data
members of the DOM object's base class DOMEventTargetHelper from
the main thread, event though that class is not thread-safe. This
commit makes those accesses happen only if the DOM object was
created on the main thread.
Note that there are still other data races in EventSource's
implementation; those will be fixed in subsequent patches.
Reporter | ||
Comment 2•4 years ago
|
||
With this commit a few of EventSource's and EventSourceImpl's data
members are now atomic, since a mutex isn't really necessary for
their use case. Also, several data members are now marked const.
Depends on D101163
Comment 3•4 years ago
|
||
Comment on attachment 9196069 [details]
Bug 1658776 - Remove some potential data races r=asuth,#dom-workers-and-storage-reviewers
Revision D101163 was moved to bug 1682928. Setting attachment 9196069 [details] to obsolete.
Comment 4•4 years ago
|
||
Comment on attachment 9196135 [details]
Bug 1658776 - Make some data members atomic or const r=asuth,#dom-workers-and-storage-reviewers
Revision D101210 was moved to bug 1682928. Setting attachment 9196135 [details] to obsolete.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
Hi Randell, would you want to give this a look? Thanks!
Comment 6•3 years ago
|
||
patches were landed on another bug
Description
•