Allow thunderbird to enable and set tcp keepalive parameters from main thread in javascript
Categories
(Core :: Networking, defect, P3)
Tracking
()
People
(Reporter: gds, Unassigned, NeedInfo)
References
(Depends on 2 open bugs)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
3.84 KB,
patch
|
Details | Diff | Splinter Review |
Thunderbird needs the ability to enable tcp keepalives for NNTP (and, in the future, possibly other protocols like IMAP) directly from javascript on the main thread. There doesn't seem to be a way to do this. If it's attempted, assertions occur that this can only be done from the socket thread.
The attachment shows a possible patch that allows only thunderbird to enable and configure keepalives from other than socket thread. I'm not seeing any problem when running TB with this patch in place.
Submission of his bug report was suggested by Magnus Melin in a comment here: https://phabricator.services.mozilla.com/D215313
Comment 1•9 months ago
|
||
Removing the assertions is almost certainly not the way to go; that probably will lead to racy access to values from multiple threads without locking.
Instead, you either need to add mutex locks to the appropriate data, send an event to socket thread to do what you need, make a or some values atomics, or equivalent. Safest, if it can work, is to have it be done on Socket Thread.
I haven't looked at why those asserts are in there, but very likely they're ensuring a critical requirement for safety/security.
Also, patches should be submitted to phabricator. Thanks!
Description
•