Bug 235402 - Disable fallback path to WebRTC platform sockets
Summary: Disable fallback path to WebRTC platform sockets
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-01-20 06:47 PST by youenn fablet
Modified: 2022-01-20 23:04 PST (History)
5 users (show)

See Also:


Attachments
Patch (8.03 KB, patch)
2022-01-20 06:50 PST, 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 2022-01-20 06:47:07 PST
Disable fallback path to WebRC platform sockets
Comment 1 youenn fablet 2022-01-20 06:50:45 PST
Created attachment 449571 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2022-01-20 08:07:58 PST
<rdar://problem/87829207>
Comment 3 EWS 2022-01-20 09:05:35 PST
Committed r288296 (246218@main): <https://commits.webkit.org/246218@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 449571 [details].
Comment 4 Geoffrey Garen 2022-01-20 09:27:12 PST
Comment on attachment 449571 [details]
Patch

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

> Source/WebKit/ChangeLog:10
> +        We should not fallback to the legacy WebRTC socket code path in Cocoa ports.
> +        Instead, if we cannot create the corresponding sockets (in case of ssltcp candidates for instance),
> +        we mark the socket as closed.

What's the expected outcome when we mark the socket as closed, and why is it an improvement?
Comment 5 youenn fablet 2022-01-20 23:04:15 PST
(In reply to Geoffrey Garen from comment #4)
> Comment on attachment 449571 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=449571&action=review
> 
> > Source/WebKit/ChangeLog:10
> > +        We should not fallback to the legacy WebRTC socket code path in Cocoa ports.
> > +        Instead, if we cannot create the corresponding sockets (in case of ssltcp candidates for instance),
> > +        we mark the socket as closed.
> 
> What's the expected outcome when we mark the socket as closed, and why is it
> an improvement?

The improvement is mostly to not go on the legacy code path (so we return early whenever m_platformTCPSocketsEnabled is true).
Closing the socket is notifying the WebProcess that this socket cannot be used, which is better for memory management.