[Webtransport]Accept options in UnidirectionalStream/BidirectionalStream [chromium/src : main]

0 views
Skip to first unread message

Nidhi Jaju (Gerrit)

unread,
2:36 AM (7 hours ago) 2:36 AM
to krishna dheeraj Pannala, android-bu...@system.gserviceaccount.com, Mayur Patil, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from Mayur Patil and krishna dheeraj Pannala

Nidhi Jaju added 5 comments

File third_party/blink/renderer/modules/webtransport/web_transport.cc
Line 849, Patchset 3 (Latest): DCHECK(options);
Nidhi Jaju . unresolved

Should this be a `CHECK`? Same in other places.

Line 881, Patchset 3 (Latest): // strong hold during the async gap. nullptr is safe — Persistent<T>
Nidhi Jaju . unresolved
```suggestion
// strong reference during the async gap. nullptr is safe — Persistent<T>
```
Line 881, Patchset 3 (Latest): // strong hold during the async gap. nullptr is safe — Persistent<T>
Nidhi Jaju . unresolved

What does this mean? Can you update the comment to clarify? Same in other places.

Line 1725, Patchset 3 (Latest): send_stream->setSendOrder(send_order);
Nidhi Jaju . unresolved

If `setSendGroup` was to throw, should we check for that before `setSendOrder`? Same for the bidirectional code.

Line 1721, Patchset 3 (Latest): if (!try_catch.HasCaught()) {
if (send_group) {
send_stream->setSendGroup(send_group, PassThroughException(isolate));
}
send_stream->setSendOrder(send_order);
}
Nidhi Jaju . unresolved

Since this is the same for both unidirectional and bidirectional streams, can we factor this out into a helper function on `WebTransportSendStream`? Maybe `ApplySendOptions()`?

Open in Gerrit

Related details

Attention is currently required from:
  • Mayur Patil
  • krishna dheeraj Pannala
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: Ie627b66d29b9d47b790a463e68eb51ef5d2b53ca
Gerrit-Change-Number: 7743083
Gerrit-PatchSet: 3
Gerrit-Owner: krishna dheeraj Pannala <kpan...@microsoft.com>
Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
Gerrit-Reviewer: Nidhi Jaju <nidh...@chromium.org>
Gerrit-Reviewer: krishna dheeraj Pannala <kpan...@microsoft.com>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
Gerrit-Attention: krishna dheeraj Pannala <kpan...@microsoft.com>
Gerrit-Comment-Date: Mon, 13 Apr 2026 06:35:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

krishna dheeraj Pannala (Gerrit)

unread,
6:52 AM (3 hours ago) 6:52 AM
to Nidhi Jaju, android-bu...@system.gserviceaccount.com, Mayur Patil, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
Attention needed from Mayur Patil and Nidhi Jaju

krishna dheeraj Pannala added 5 comments

File third_party/blink/renderer/modules/webtransport/web_transport.cc
Line 849, Patchset 3: DCHECK(options);
Nidhi Jaju . resolved

Should this be a `CHECK`? Same in other places.

krishna dheeraj Pannala

Done. Changed to `CHECK(options)` in all three places: ` createUnidirectionalStream()`, `createBidirectionalStream()`, and `ExtractSendStreamOptions()`.

Line 881, Patchset 3: // strong hold during the async gap. nullptr is safe — Persistent<T>
Nidhi Jaju . resolved
```suggestion
// strong reference during the async gap. nullptr is safe — Persistent<T>
```
krishna dheeraj Pannala

Addressed together with Comment 2, rewrote the entire comment block for clarity.

Line 881, Patchset 3: // strong hold during the async gap. nullptr is safe — Persistent<T>
Nidhi Jaju . resolved

What does this mean? Can you update the comment to clarify? Same in other places.

krishna dheeraj Pannala
Done. Rewrote the comment to be explicit about what's happening:
> Capture send_group via WrapPersistent so it survives the asynchronous
Mojo round-trip (between `CreateStream()` and the callback). The
transport's ` send_groups_` registry uses `WeakMember`, so without this
strong reference the group could be garbage-collected if JS drops all
references before the callback fires. `nullptr` is safe, `Persistent<T>`
accepts null.
Line 1725, Patchset 3: send_stream->setSendOrder(send_order);
Nidhi Jaju . resolved

If `setSendGroup` was to throw, should we check for that before `setSendOrder`? Same for the bidirectional code.

krishna dheeraj Pannala

Fixed `ApplySendStreamOptions()` now calls `setSendGroup()` first, checks `exception_state.HadException()`, and returns early before calling `setSendOrder()` if it threw. Applied to both unidirectional and bidirectional paths

Line 1721, Patchset 3: if (!try_catch.HasCaught()) {

if (send_group) {
send_stream->setSendGroup(send_group, PassThroughException(isolate));
}
send_stream->setSendOrder(send_order);
}
Nidhi Jaju . resolved

Since this is the same for both unidirectional and bidirectional streams, can we factor this out into a helper function on `WebTransportSendStream`? Maybe `ApplySendOptions()`?

krishna dheeraj Pannala

Done. Added `WebTransportSendStream::ApplySendStreamOptions(send_group, send_order, exception_state)` that handles the sequencing correctly (setSendGroup → check exception → setSendOrder). Both `OnCreateSendStreamResponse` and `OnCreateBidirectionalStreamResponse` now use this single helper.

Open in Gerrit

Related details

Attention is currently required from:
  • Mayur Patil
  • Nidhi Jaju
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: Ie627b66d29b9d47b790a463e68eb51ef5d2b53ca
    Gerrit-Change-Number: 7743083
    Gerrit-PatchSet: 4
    Gerrit-Owner: krishna dheeraj Pannala <kpan...@microsoft.com>
    Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Nidhi Jaju <nidh...@chromium.org>
    Gerrit-Reviewer: krishna dheeraj Pannala <kpan...@microsoft.com>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
    Gerrit-Attention: Nidhi Jaju <nidh...@chromium.org>
    Gerrit-Comment-Date: Mon, 13 Apr 2026 10:51:31 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Nidhi Jaju <nidh...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Nidhi Jaju (Gerrit)

    unread,
    7:42 AM (2 hours ago) 7:42 AM
    to krishna dheeraj Pannala, Adam Rice, android-bu...@system.gserviceaccount.com, Mayur Patil, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org
    Attention needed from Adam Rice, Mayur Patil and krishna dheeraj Pannala

    Nidhi Jaju voted and added 1 comment

    Votes added by Nidhi Jaju

    Code-Review+1

    1 comment

    Patchset-level comments
    File-level comment, Patchset 4 (Latest):
    Nidhi Jaju . resolved

    lgtm, let me add @ri...@chromium.org as a third_party/blink/renderer/modules/webtransport/ owner

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Adam Rice
    • Mayur Patil
    • krishna dheeraj Pannala
    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: Ie627b66d29b9d47b790a463e68eb51ef5d2b53ca
    Gerrit-Change-Number: 7743083
    Gerrit-PatchSet: 4
    Gerrit-Owner: krishna dheeraj Pannala <kpan...@microsoft.com>
    Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
    Gerrit-Reviewer: Mayur Patil <patil...@microsoft.com>
    Gerrit-Reviewer: Nidhi Jaju <nidh...@chromium.org>
    Gerrit-Reviewer: krishna dheeraj Pannala <kpan...@microsoft.com>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: Mayur Patil <patil...@microsoft.com>
    Gerrit-Attention: krishna dheeraj Pannala <kpan...@microsoft.com>
    Gerrit-Attention: Adam Rice <ri...@chromium.org>
    Gerrit-Comment-Date: Mon, 13 Apr 2026 11:42:05 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages