Bug 211291 - Sending WebRTC network packets should not go through the main thread
Summary: Sending WebRTC network packets should not go through the main thread
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-01 07:33 PDT by youenn fablet
Modified: 2020-05-07 02:24 PDT (History)
13 users (show)

See Also:


Attachments
Patch (3.17 KB, patch)
2020-05-01 07:36 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (16.06 KB, patch)
2020-05-05 08:17 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (16.07 KB, patch)
2020-05-05 08:26 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (25.77 KB, patch)
2020-05-06 05:49 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (21.43 KB, patch)
2020-05-06 07:42 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (25.76 KB, patch)
2020-05-06 07:48 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (26.20 KB, patch)
2020-05-06 10:22 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (25.76 KB, patch)
2020-05-07 01:56 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2020-05-01 07:33:07 PDT
Sending WebRTC network packets should not go through the main thread
Comment 1 youenn fablet 2020-05-01 07:36:00 PDT
Created attachment 398182 [details]
Patch
Comment 2 Eric Carlson 2020-05-01 09:29:29 PDT
Comment on attachment 398182 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=398182&action=review

> Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocket.cpp:61
>  void LibWebRTCSocket::sendOnMainThread(Function<void(IPC::Connection&)>&& callback)

Should this be renamed now that it doesn't send on the main thread?
Comment 3 youenn fablet 2020-05-01 09:41:25 PDT
(In reply to Eric Carlson from comment #2)
> Comment on attachment 398182 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=398182&action=review
> 
> > Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocket.cpp:61
> >  void LibWebRTCSocket::sendOnMainThread(Function<void(IPC::Connection&)>&& callback)
> 
> Should this be renamed now that it doesn't send on the main thread?

Right, we also need a better handling of getting the IPC::Connection.
The callOnMainThreadAndWait should be removed to ensure we do not end up in a deadlock.
Comment 4 youenn fablet 2020-05-05 08:17:31 PDT
Created attachment 398508 [details]
Patch
Comment 5 youenn fablet 2020-05-05 08:26:31 PDT
Created attachment 398509 [details]
Patch
Comment 6 youenn fablet 2020-05-06 05:49:13 PDT
Created attachment 398604 [details]
Patch
Comment 7 youenn fablet 2020-05-06 07:42:21 PDT
Created attachment 398612 [details]
Patch
Comment 8 youenn fablet 2020-05-06 07:48:09 PDT
Created attachment 398613 [details]
Patch
Comment 9 Eric Carlson 2020-05-06 09:44:32 PDT
Comment on attachment 398613 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=398613&action=review

> Source/WebCore/ChangeLog:12
> +        Fix a case where the SDP would be badly formatted we do not have yet a MDNS name for the corresponding IP address.

s/would be badly formatted we do not have yet a MDNS name/would be badly formatted if we do not yet have an MDNS name/

> Source/WebCore/ChangeLog:13
> +        Small refactoring to use less else if

s/use less else if/use early returns/
Comment 10 youenn fablet 2020-05-06 10:22:08 PDT
Created attachment 398634 [details]
Patch for landing
Comment 11 youenn fablet 2020-05-07 01:56:28 PDT
Created attachment 398714 [details]
Patch for landing
Comment 12 EWS 2020-05-07 02:23:48 PDT
Committed r261277: <https://trac.webkit.org/changeset/261277>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 398714 [details].
Comment 13 Radar WebKit Bug Importer 2020-05-07 02:24:16 PDT
<rdar://problem/62967836>