Bug 227210

Summary: [Cocoa] Migrate WebRTC UDP socket handling to NW API
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, eric.carlson, ews-watchlist, ggaren, glenn, jer.noble, philipj, sergio, tsavell, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=233752
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch for landing
none
Patch for landing
none
Patch for landing
none
Patch for landing
none
Patch
none
Patch none

Description youenn fablet 2021-06-21 04:33:26 PDT
[Cocoa] Migrate WebRTC UDP socket handling to NW API
Comment 1 youenn fablet 2021-06-21 05:02:06 PDT
Created attachment 431847 [details]
Patch
Comment 2 youenn fablet 2021-06-21 05:36:16 PDT
Created attachment 431849 [details]
Patch
Comment 3 youenn fablet 2021-06-21 09:02:45 PDT
Created attachment 431867 [details]
Patch
Comment 4 youenn fablet 2021-06-21 11:06:12 PDT
Created attachment 431880 [details]
Patch
Comment 5 youenn fablet 2021-06-21 11:43:08 PDT
Created attachment 431887 [details]
Patch
Comment 6 youenn fablet 2021-06-22 02:33:39 PDT
Created attachment 431951 [details]
Patch
Comment 7 youenn fablet 2021-06-22 03:48:26 PDT
Created attachment 431954 [details]
Patch
Comment 8 youenn fablet 2021-06-22 04:51:30 PDT
Created attachment 431958 [details]
Patch
Comment 9 Radar WebKit Bug Importer 2021-06-28 04:34:16 PDT
<rdar://problem/79859045>
Comment 10 youenn fablet 2021-06-28 10:45:09 PDT
iOS test failure is probably related to change in the timing, but I do not think this is a regression per se.
Comment 11 Eric Carlson 2021-06-28 10:57:08 PDT
Comment on attachment 431958 [details]
Patch

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

> Source/WebKit/NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.h:2
> + * Copyright (C) 2020 Apple Inc. All rights reserved.

Nit: should this be 2021?

> Source/WebKit/NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.mm:2
> + * Copyright (C) 2020 Apple Inc. All rights reserved.

Ditto

> Source/WebKit/NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.mm:74
> +        if (error)
> +            return;

Is it worth logging this error?
Comment 12 youenn fablet 2021-06-29 10:04:44 PDT
Created attachment 432493 [details]
Patch for landing
Comment 13 EWS 2021-06-30 00:44:25 PDT
ChangeLog entry in LayoutTests/ChangeLog contains OOPS!.
Comment 14 youenn fablet 2021-06-30 00:45:50 PDT
Created attachment 432570 [details]
Patch for landing
Comment 15 EWS 2021-06-30 00:47:08 PDT
ChangeLog entry in LayoutTests/ChangeLog contains OOPS!.
Comment 16 youenn fablet 2021-06-30 00:49:57 PDT
Created attachment 432571 [details]
Patch for landing
Comment 17 EWS 2021-06-30 01:46:45 PDT
Committed r279405 (239270@main): <https://commits.webkit.org/239270@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 432571 [details].
Comment 18 Truitt Savell 2021-06-30 14:00:49 PDT
t looks like the changes in https://trac.webkit.org/changeset/279405/webkit 

broke 50+ webrtc tests for mac debug https://build.webkit.org/#/builders/23/builds/2608

We should revert this if it is not a quick fix
Comment 19 Truitt Savell 2021-06-30 14:16:26 PDT
Reverted r279405 for reason:

Casued 50+ webrtc crashes on Big Sur Debug

Committed r279432 (239291@main): <https://commits.webkit.org/239291@main>
Comment 20 youenn fablet 2021-07-01 00:43:03 PDT
Crash seems to be related to use of nw_endpoint_get_hostname which is not behaving the same in BigSur and Monterey.
I will check endpoint type for extra safety.
Comment 21 youenn fablet 2021-07-01 01:11:10 PDT
Created attachment 432667 [details]
Patch for landing
Comment 22 EWS 2021-07-01 03:37:45 PDT
Committed r279461 (239317@main): <https://commits.webkit.org/239317@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 432667 [details].
Comment 23 youenn fablet 2021-07-01 06:54:23 PDT
Reopening to attach new patch.
Comment 24 youenn fablet 2021-07-01 06:54:26 PDT
Created attachment 432687 [details]
Patch
Comment 25 youenn fablet 2021-07-01 08:04:40 PDT
Created attachment 432691 [details]
Patch
Comment 26 EWS 2021-07-01 08:58:09 PDT
Committed r279464 (239320@main): <https://commits.webkit.org/239320@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 432691 [details].