[webkit-reviews] review granted: [Bug 228649] Attribute nw connections to the page bundle identifier : [Attachment 434743] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 2 09:44:19 PDT 2021


Eric Carlson <eric.carlson at apple.com> has granted youenn fablet
<youennf at gmail.com>'s request for review:
Bug 228649: Attribute nw connections to the page bundle identifier
https://bugs.webkit.org/show_bug.cgi?id=228649

Attachment 434743: Patch

https://bugs.webkit.org/attachment.cgi?id=434743&action=review




--- Comment #4 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 434743
  --> https://bugs.webkit.org/attachment.cgi?id=434743
Patch

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

> Source/WebKit/NetworkProcess/NetworkSession.cpp:411
> +    return m_attributedBundleIdentifierFromPageIdentifiers.get(identifier);

It is worth ASSERTing that the identifier is in the map?

> Source/WebKit/NetworkProcess/webrtc/NetworkRTCProvider.cpp:159
> +	   if (auto socket =
NetworkRTCUDPSocketCocoa::createUDPSocket(identifier, *this, address.value,
minPort, maxPort, m_ipcConnection.copyRef(),
String(attributedBundleIdentifierFromPageIdentifier(pageIdentifier)),
isFirstParty, isRelayDisabled,	 WTFMove(domain))) {

Nit: extra space before `WTFMove`

Is this called often enough that it would be worth keeping a pageIdentifier ->
attributedBundleIdentifier map in the provider instead of doing the synchronous
cross-thread hop every time?

> Source/WebKit/NetworkProcess/webrtc/NetworkRTCProvider.cpp:202
> +	   if (auto socket =
NetworkRTCTCPSocketCocoa::createClientTCPSocket(identifier, *this,
remoteAddress.value, options,
attributedBundleIdentifierFromPageIdentifier(pageIdentifier), isRelayDisabled,
m_ipcConnection.copyRef())) {

Ditto.


More information about the webkit-reviews mailing list