[Connection-Allowlist] Enforce "webrtc" header param. [chromium/src : main]

0 views
Skip to first unread message

Andrew Verge (Gerrit)

unread,
Mar 17, 2026, 4:46:57 PMMar 17
to Chromium LUCI CQ, AyeAye, blink-...@chromium.org, video-networking...@google.com, blink-revie...@chromium.org

Andrew Verge voted and added 1 comment

Votes added by Andrew Verge

Commit-Queue+1

1 comment

File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
Line 646, Patchset 1 (Latest): LocalDOMWindow* window = To<LocalDOMWindow>(context);
Andrew Verge . unresolved

Is RTCPeerConnection only allowed on windows? I ask because we need to pull the relevant WebRTC behavior from the PolicyContainer, and that's not always set for workers on the renderer-side.

From the [spec](https://www.w3.org/TR/webrtc/#interface-definition) that appears to be the case, but I saw other interfaces like RTCDataChannel defined on workers so want to be doubly sure.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib10bda11020df74e3ecd41450027cacbf6a7bd2a
Gerrit-Change-Number: 7676321
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Verge <ave...@chromium.org>
Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
Gerrit-Comment-Date: Tue, 17 Mar 2026 20:46:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Andrew Verge (Gerrit)

unread,
Mar 17, 2026, 4:52:17 PMMar 17
to Chromium LUCI CQ, AyeAye, blink-...@chromium.org, video-networking...@google.com, blink-revie...@chromium.org

Andrew Verge added 1 comment

File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
Line 672, Patchset 1 (Latest): exception_state.ThrowDOMException(
Andrew Verge . unresolved

Spec note for @mk...@chromium.org:

Currently the spec reads: "To constrain WebRTC connections, [[webrtc]] can call into the [$should WebRTC be blocked by Connection Allowlists$]
algorithm while determining whether candidates are <a spec="webrtc">administratively prohibited</a>."

This CL throws in the RTCPeerConnection constructor, which is before we consider any potential candidates for communication. We should change that line in the spec to reflect as such.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib10bda11020df74e3ecd41450027cacbf6a7bd2a
Gerrit-Change-Number: 7676321
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Verge <ave...@chromium.org>
Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
Gerrit-Comment-Date: Tue, 17 Mar 2026 20:52:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Andrew Verge (Gerrit)

unread,
Mar 17, 2026, 8:18:03 PMMar 17
to Mike West, Harald Alvestrand, Chromium LUCI CQ, AyeAye, blink-...@chromium.org, video-networking...@google.com, blink-revie...@chromium.org
Attention needed from Harald Alvestrand and Mike West

Andrew Verge added 1 comment

File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
Line 646, Patchset 1: LocalDOMWindow* window = To<LocalDOMWindow>(context);
Andrew Verge . unresolved

Is RTCPeerConnection only allowed on windows? I ask because we need to pull the relevant WebRTC behavior from the PolicyContainer, and that's not always set for workers on the renderer-side.

From the [spec](https://www.w3.org/TR/webrtc/#interface-definition) that appears to be the case, but I saw other interfaces like RTCDataChannel defined on workers so want to be doubly sure.

Andrew Verge
Open in Gerrit

Related details

Attention is currently required from:
  • Harald Alvestrand
  • Mike West
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib10bda11020df74e3ecd41450027cacbf6a7bd2a
Gerrit-Change-Number: 7676321
Gerrit-PatchSet: 3
Gerrit-Owner: Andrew Verge <ave...@chromium.org>
Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
Gerrit-Reviewer: Mike West <mk...@chromium.org>
Gerrit-Attention: Mike West <mk...@chromium.org>
Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
Gerrit-Comment-Date: Wed, 18 Mar 2026 00:17:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Andrew Verge <ave...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Mike West (Gerrit)

unread,
Mar 18, 2026, 7:25:06 AMMar 18
to Andrew Verge, Harald Alvestrand, Chromium LUCI CQ, AyeAye, blink-...@chromium.org, video-networking...@google.com, blink-revie...@chromium.org
Attention needed from Andrew Verge and Harald Alvestrand

Mike West voted and added 2 comments

Votes added by Mike West

Code-Review+1

2 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Mike West . resolved

I'll defer to Harald on the RTC bits, as he's much more familiar with that code than I. That said, some test suggestions: otherwise LGTM.

File third_party/blink/web_tests/external/wpt/connection-allowlist/tentative/webrtc-allow.sub.window.js
Line 7, Patchset 3 (Latest): await fetch('resources/foo.html');
Mike West . unresolved

Two suggestions for this bit across all the tests:

1. Let's not add another file: just load `/common/blank.html` if the content doesn't matter.

2. I'd move this to a separate test, e.g. `promise_test(t => { return fetch('/common/blank.html`); }, "Fetches are unaffected by the `webrtc` property's value.")`. That makes things clearer, IMO.

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Verge
  • Harald Alvestrand
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib10bda11020df74e3ecd41450027cacbf6a7bd2a
Gerrit-Change-Number: 7676321
Gerrit-PatchSet: 3
Gerrit-Owner: Andrew Verge <ave...@chromium.org>
Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
Gerrit-Reviewer: Mike West <mk...@chromium.org>
Gerrit-Attention: Andrew Verge <ave...@chromium.org>
Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
Gerrit-Comment-Date: Wed, 18 Mar 2026 11:24:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Andrew Verge (Gerrit)

unread,
Mar 18, 2026, 12:55:57 PMMar 18
to Shivani Sharma, Mike West, Harald Alvestrand, Chromium LUCI CQ, AyeAye, blink-...@chromium.org, video-networking...@google.com, blink-revie...@chromium.org
Attention needed from Harald Alvestrand and Mike West

Andrew Verge added 1 comment

File third_party/blink/web_tests/external/wpt/connection-allowlist/tentative/webrtc-allow.sub.window.js
Line 7, Patchset 3: await fetch('resources/foo.html');
Mike West . resolved

Two suggestions for this bit across all the tests:

1. Let's not add another file: just load `/common/blank.html` if the content doesn't matter.

2. I'd move this to a separate test, e.g. `promise_test(t => { return fetch('/common/blank.html`); }, "Fetches are unaffected by the `webrtc` property's value.")`. That makes things clearer, IMO.

Andrew Verge

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Harald Alvestrand
  • Mike West
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ib10bda11020df74e3ecd41450027cacbf6a7bd2a
    Gerrit-Change-Number: 7676321
    Gerrit-PatchSet: 4
    Gerrit-Owner: Andrew Verge <ave...@chromium.org>
    Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
    Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
    Gerrit-Reviewer: Mike West <mk...@chromium.org>
    Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
    Gerrit-Attention: Mike West <mk...@chromium.org>
    Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
    Gerrit-Comment-Date: Wed, 18 Mar 2026 16:55:50 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Mike West <mk...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrew Verge (Gerrit)

    unread,
    Mar 18, 2026, 1:41:00 PMMar 18
    to Shivani Sharma, Mike West, Harald Alvestrand, Chromium LUCI CQ, AyeAye, blink-...@chromium.org, video-networking...@google.com, blink-revie...@chromium.org
    Attention needed from Harald Alvestrand and Mike West

    Andrew Verge added 1 comment

    File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
    Line 672, Patchset 1: exception_state.ThrowDOMException(
    Andrew Verge . resolved

    Spec note for @mk...@chromium.org:

    Currently the spec reads: "To constrain WebRTC connections, [[webrtc]] can call into the [$should WebRTC be blocked by Connection Allowlists$]
    algorithm while determining whether candidates are <a spec="webrtc">administratively prohibited</a>."

    This CL throws in the RTCPeerConnection constructor, which is before we consider any potential candidates for communication. We should change that line in the spec to reflect as such.

    Andrew Verge

    I put up a spec PR to rectify this: https://github.com/WICG/connection-allowlists/pull/13

    Gerrit-Comment-Date: Wed, 18 Mar 2026 17:40:52 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Andrew Verge <ave...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mike West (Gerrit)

    unread,
    Mar 19, 2026, 10:11:47 AMMar 19
    to Andrew Verge, Shivani Sharma, Harald Alvestrand, Chromium LUCI CQ, AyeAye, blink-...@chromium.org, video-networking...@google.com, blink-revie...@chromium.org
    Attention needed from Andrew Verge and Harald Alvestrand

    Mike West added 1 comment

    File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
    Line 669, Patchset 4 (Latest): policy_container_policies.connection_allowlists.enforced
    Mike West . unresolved

    Looking at this again, I think it's fine for us to enforce here to ensure that we have the correct web-facing behavior, but it would be ideal to have something outside the renderer that's backing this up with a check in a high-trust process.

    I'd imagine that `RTCPeerConnection` will eventually poke something across a mojo pipe to actually initiate network connections. Is there some point at which we could respond with `mojo::ReportBadMessage` if the relevant policy container says "Nope."?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrew Verge
    • Harald Alvestrand
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ib10bda11020df74e3ecd41450027cacbf6a7bd2a
    Gerrit-Change-Number: 7676321
    Gerrit-PatchSet: 4
    Gerrit-Owner: Andrew Verge <ave...@chromium.org>
    Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
    Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
    Gerrit-Reviewer: Mike West <mk...@chromium.org>
    Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
    Gerrit-Attention: Andrew Verge <ave...@chromium.org>
    Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
    Gerrit-Comment-Date: Thu, 19 Mar 2026 14:11:29 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrew Verge (Gerrit)

    unread,
    Mar 19, 2026, 10:19:20 AMMar 19
    to Shivani Sharma, Mike West, Harald Alvestrand, Chromium LUCI CQ, AyeAye, blink-...@chromium.org, video-networking...@google.com, blink-revie...@chromium.org
    Attention needed from Harald Alvestrand and Mike West

    Andrew Verge added 1 comment

    File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
    Line 669, Patchset 4 (Latest): policy_container_policies.connection_allowlists.enforced
    Mike West . unresolved

    Looking at this again, I think it's fine for us to enforce here to ensure that we have the correct web-facing behavior, but it would be ideal to have something outside the renderer that's backing this up with a check in a high-trust process.

    I'd imagine that `RTCPeerConnection` will eventually poke something across a mojo pipe to actually initiate network connections. Is there some point at which we could respond with `mojo::ReportBadMessage` if the relevant policy container says "Nope."?

    Andrew Verge

    Looking at this again, I think it's fine for us to enforce here to ensure that we have the correct web-facing behavior, but it would be ideal to have something outside the renderer that's backing this up with a check in a high-trust process.

    That's what the change in `browser_interface_binders.cc` is for. The `P2PSocketManager` gets [bound in the network service](https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/p2p/socket_dispatcher_host.cc;drc=2fff3fdd8ba33169c02b49c8ceb92b424f8e9a56;l=86) via `browser_interface_binders` in the trusted browser process. If our WebRTC policy is `kBlock`, then we won't bind, and can't even send RPCs in the first place.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Harald Alvestrand
    • Mike West
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ib10bda11020df74e3ecd41450027cacbf6a7bd2a
    Gerrit-Change-Number: 7676321
    Gerrit-PatchSet: 4
    Gerrit-Owner: Andrew Verge <ave...@chromium.org>
    Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
    Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
    Gerrit-Reviewer: Mike West <mk...@chromium.org>
    Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
    Gerrit-Attention: Mike West <mk...@chromium.org>
    Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
    Gerrit-Comment-Date: Thu, 19 Mar 2026 14:19:11 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Mike West <mk...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrew Verge (Gerrit)

    unread,
    Mar 19, 2026, 10:21:49 AMMar 19
    to Shivani Sharma, Mike West, Harald Alvestrand, Chromium LUCI CQ, AyeAye, blink-...@chromium.org, video-networking...@google.com, blink-revie...@chromium.org
    Attention needed from Harald Alvestrand and Mike West

    Andrew Verge added 1 comment

    File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
    Line 669, Patchset 4 (Latest): policy_container_policies.connection_allowlists.enforced
    Mike West . unresolved

    Looking at this again, I think it's fine for us to enforce here to ensure that we have the correct web-facing behavior, but it would be ideal to have something outside the renderer that's backing this up with a check in a high-trust process.

    I'd imagine that `RTCPeerConnection` will eventually poke something across a mojo pipe to actually initiate network connections. Is there some point at which we could respond with `mojo::ReportBadMessage` if the relevant policy container says "Nope."?

    Andrew Verge

    Looking at this again, I think it's fine for us to enforce here to ensure that we have the correct web-facing behavior, but it would be ideal to have something outside the renderer that's backing this up with a check in a high-trust process.

    That's what the change in `browser_interface_binders.cc` is for. The `P2PSocketManager` gets [bound in the network service](https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/p2p/socket_dispatcher_host.cc;drc=2fff3fdd8ba33169c02b49c8ceb92b424f8e9a56;l=86) via `browser_interface_binders` in the trusted browser process. If our WebRTC policy is `kBlock`, then we won't bind, and can't even send RPCs in the first place.

    Andrew Verge

    (There's even more context [in this CL description](https://crrev.com/c/5672111) where we did the same for fenced frames).

    Gerrit-Comment-Date: Thu, 19 Mar 2026 14:21:41 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Andrew Verge <ave...@chromium.org>
    Comment-In-Reply-To: Mike West <mk...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mike West (Gerrit)

    unread,
    Mar 20, 2026, 3:04:57 AMMar 20
    to Andrew Verge, Shivani Sharma, Harald Alvestrand, Chromium LUCI CQ, AyeAye, blink-...@chromium.org, video-networking...@google.com, blink-revie...@chromium.org
    Attention needed from Andrew Verge and Harald Alvestrand

    Mike West voted and added 1 comment

    Votes added by Mike West

    Code-Review+1

    1 comment

    File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
    Line 669, Patchset 4 (Latest): policy_container_policies.connection_allowlists.enforced
    Mike West . resolved

    Looking at this again, I think it's fine for us to enforce here to ensure that we have the correct web-facing behavior, but it would be ideal to have something outside the renderer that's backing this up with a check in a high-trust process.

    I'd imagine that `RTCPeerConnection` will eventually poke something across a mojo pipe to actually initiate network connections. Is there some point at which we could respond with `mojo::ReportBadMessage` if the relevant policy container says "Nope."?

    Andrew Verge

    Looking at this again, I think it's fine for us to enforce here to ensure that we have the correct web-facing behavior, but it would be ideal to have something outside the renderer that's backing this up with a check in a high-trust process.

    That's what the change in `browser_interface_binders.cc` is for. The `P2PSocketManager` gets [bound in the network service](https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/p2p/socket_dispatcher_host.cc;drc=2fff3fdd8ba33169c02b49c8ceb92b424f8e9a56;l=86) via `browser_interface_binders` in the trusted browser process. If our WebRTC policy is `kBlock`, then we won't bind, and can't even send RPCs in the first place.

    Andrew Verge

    (There's even more context [in this CL description](https://crrev.com/c/5672111) where we did the same for fenced frames).

    Mike West

    Got it, thank you. Still LGTM, still interested in someone with more WebRTC experience weighing in.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrew Verge
    • Harald Alvestrand
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib10bda11020df74e3ecd41450027cacbf6a7bd2a
      Gerrit-Change-Number: 7676321
      Gerrit-PatchSet: 4
      Gerrit-Owner: Andrew Verge <ave...@chromium.org>
      Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
      Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
      Gerrit-Reviewer: Mike West <mk...@chromium.org>
      Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
      Gerrit-Attention: Andrew Verge <ave...@chromium.org>
      Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
      Gerrit-Comment-Date: Fri, 20 Mar 2026 07:04:34 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Harald Alvestrand (Gerrit)

      unread,
      Mar 25, 2026, 3:52:03 PMMar 25
      to Andrew Verge, Code Review Nudger, Mike West, Shivani Sharma, Chromium LUCI CQ, AyeAye, blink-...@chromium.org, video-networking...@google.com, blink-revie...@chromium.org
      Attention needed from Andrew Verge

      Harald Alvestrand added 4 comments

      Patchset-level comments
      File-level comment, Patchset 4 (Latest):
      Harald Alvestrand . resolved

      Replying to a few comments.

      File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
      Line 646, Patchset 1: LocalDOMWindow* window = To<LocalDOMWindow>(context);
      Andrew Verge . unresolved

      Is RTCPeerConnection only allowed on windows? I ask because we need to pull the relevant WebRTC behavior from the PolicyContainer, and that's not always set for workers on the renderer-side.

      From the [spec](https://www.w3.org/TR/webrtc/#interface-definition) that appears to be the case, but I saw other interfaces like RTCDataChannel defined on workers so want to be doubly sure.

      Andrew Verge

      CC @h...@chromium.org

      Harald Alvestrand

      At the moment, RTCPeerConnection is only exposed on Window. There have been discussions on exposing it on Worker, but so far, nobody's been willing to invest in specifying how it would behave.

      RTCDataChannel is (newly) defined as transferable, so that's how it can be exposed on worker.

      Line 675, Patchset 4 (Latest): "\"Connection-Allowlist\" header.");
      Harald Alvestrand . unresolved

      Do you intend to add an UMA counter to figure out how often this happens in practice?

      Line 807, Patchset 4 (Latest): error_callback)) {
      Harald Alvestrand . unresolved

      Should these reformatting things be done in a separate CL?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Andrew Verge
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib10bda11020df74e3ecd41450027cacbf6a7bd2a
      Gerrit-Change-Number: 7676321
      Gerrit-PatchSet: 4
      Gerrit-Owner: Andrew Verge <ave...@chromium.org>
      Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
      Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
      Gerrit-Reviewer: Mike West <mk...@chromium.org>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
      Gerrit-Attention: Andrew Verge <ave...@chromium.org>
      Gerrit-Comment-Date: Wed, 25 Mar 2026 19:51:44 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Andrew Verge (Gerrit)

      unread,
      Apr 7, 2026, 10:33:39 AM (6 days ago) Apr 7
      to Chromium Metrics Reviews, Code Review Nudger, Mike West, Shivani Sharma, Harald Alvestrand, Chromium LUCI CQ, AyeAye, asvitkine...@chromium.org, blink-...@chromium.org, video-networking...@google.com, blink-revie...@chromium.org
      Attention needed from Harald Alvestrand and Mike West

      Andrew Verge added 3 comments

      File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
      Line 646, Patchset 1: LocalDOMWindow* window = To<LocalDOMWindow>(context);
      Andrew Verge . resolved

      Is RTCPeerConnection only allowed on windows? I ask because we need to pull the relevant WebRTC behavior from the PolicyContainer, and that's not always set for workers on the renderer-side.

      From the [spec](https://www.w3.org/TR/webrtc/#interface-definition) that appears to be the case, but I saw other interfaces like RTCDataChannel defined on workers so want to be doubly sure.

      Andrew Verge

      CC @h...@chromium.org

      Harald Alvestrand

      At the moment, RTCPeerConnection is only exposed on Window. There have been discussions on exposing it on Worker, but so far, nobody's been willing to invest in specifying how it would behave.

      RTCDataChannel is (newly) defined as transferable, so that's how it can be exposed on worker.

      Andrew Verge

      Given that creating a data channel still requires an RTCPeerConnection, and we're blocking creation at the Window level, I think we can resolve this.

      Line 675, Patchset 4: "\"Connection-Allowlist\" header.");
      Harald Alvestrand . resolved

      Do you intend to add an UMA counter to figure out how often this happens in practice?

      Andrew Verge

      Done

      Line 807, Patchset 4: error_callback)) {
      Harald Alvestrand . resolved

      Should these reformatting things be done in a separate CL?

      Andrew Verge

      Done, reverted the formatting changes for now (this was just the result of running my usual `git cl format` over the file before uploading).

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Harald Alvestrand
      • Mike West
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib10bda11020df74e3ecd41450027cacbf6a7bd2a
      Gerrit-Change-Number: 7676321
      Gerrit-PatchSet: 5
      Gerrit-Owner: Andrew Verge <ave...@chromium.org>
      Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
      Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
      Gerrit-Reviewer: Mike West <mk...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
      Gerrit-Attention: Mike West <mk...@chromium.org>
      Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
      Gerrit-Comment-Date: Tue, 07 Apr 2026 14:33:33 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Andrew Verge <ave...@chromium.org>
      Comment-In-Reply-To: Harald Alvestrand <h...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Harald Alvestrand (Gerrit)

      unread,
      Apr 10, 2026, 8:22:20 AM (3 days ago) Apr 10
      to Andrew Verge, Chromium Metrics Reviews, Code Review Nudger, Mike West, Shivani Sharma, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, asvitkine...@chromium.org, blink-...@chromium.org, video-networking...@google.com, blink-revie...@chromium.org
      Attention needed from Andrew Verge

      Harald Alvestrand voted and added 4 comments

      Votes added by Harald Alvestrand

      Code-Review+1

      4 comments

      Patchset-level comments
      File-level comment, Patchset 7 (Latest):
      Harald Alvestrand . resolved

      LGTM, some comments.

      File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
      Line 669, Patchset 7 (Latest): true);
      Harald Alvestrand . unresolved

      Should there be an unit test that verifies that the histogram is updated?

      File third_party/blink/web_tests/external/wpt/connection-allowlist/tentative/webrtc-allow.sub.window.js
      Line 9, Patchset 7 (Latest): 'iceServers': [{'urls': 'stun:stun.example.com:19302'}]
      Harald Alvestrand . unresolved

      The way the forbidding is implemented, you shouldn't need any configuration - it gets rejected anyway. (Having no ICE servers is a legal use case, just not for 100% reachability of VC servics)

      File third_party/blink/web_tests/external/wpt/connection-allowlist/tentative/webrtc-block-default.sub.window.js
      Line 9, Patchset 7 (Latest): 'iceServers': [{'urls': 'stun:stun.example.com:19302'}]
      Harald Alvestrand . unresolved

      Same comment here.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Andrew Verge
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ib10bda11020df74e3ecd41450027cacbf6a7bd2a
        Gerrit-Change-Number: 7676321
        Gerrit-PatchSet: 7
        Gerrit-Owner: Andrew Verge <ave...@chromium.org>
        Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
        Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
        Gerrit-Reviewer: Mike West <mk...@chromium.org>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
        Gerrit-Attention: Andrew Verge <ave...@chromium.org>
        Gerrit-Comment-Date: Fri, 10 Apr 2026 12:22:05 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Johannes Kron (Gerrit)

        unread,
        6:06 AM (4 hours ago) 6:06 AM
        to Andrew Verge, Harald Alvestrand, Chromium Metrics Reviews, Code Review Nudger, Mike West, Shivani Sharma, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, asvitkine...@chromium.org, blink-...@chromium.org, video-networking...@google.com, blink-revie...@chromium.org
        Attention needed from Andrew Verge

        Johannes Kron added 1 comment

        File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
        Line 668, Patchset 7 (Latest): UMA_HISTOGRAM_BOOLEAN("WebRTC.PeerConnection.BlockedByConnectionAllowlist",
        Johannes Kron . unresolved

        It's preferred to use the corresponding histogram function (base::UmaHistogramBoolean) unless this is in a critical path.

        See this link for more information, https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md#coding-emitting-to-histograms

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Andrew Verge
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ib10bda11020df74e3ecd41450027cacbf6a7bd2a
        Gerrit-Change-Number: 7676321
        Gerrit-PatchSet: 7
        Gerrit-Owner: Andrew Verge <ave...@chromium.org>
        Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
        Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
        Gerrit-Reviewer: Johannes Kron <kr...@chromium.org>
        Gerrit-Reviewer: Mike West <mk...@chromium.org>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
        Gerrit-Attention: Andrew Verge <ave...@chromium.org>
        Gerrit-Comment-Date: Mon, 13 Apr 2026 10:06:19 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages