| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
void ForgetStream(WebTransport* transport,I think this will still be called if the WebTransport has been garbage collected, in which case `transport` will be nullptr, so you should return early in that case. It would be good to have a unit test for this case, but unfortunately writing tests for garbage collection is quite difficult.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
I think this will still be called if the WebTransport has been garbage collected, in which case `transport` will be nullptr, so you should return early in that case. It would be good to have a unit test for this case, but unfortunately writing tests for garbage collection is quite difficult.
Aadded the if (!transport) return; guard in this CL.
For the unit test,As you menitoned GC tests are tricky here. I have one working locally that exercises the exact path: construct WebTransportReceiveStream directly (bypassing the accept flow so it's not in incoming_stream_map_),break the mojo connection, GC, then trigger AbortAndReset to fire on_abort_ with a now-null transport. Verified it works as expected by removing the guard, passes with the guard restored.Since the test depends on the wire-up Cl, I would prefer to land it in next CL2 if thats okay with you.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM
WebTransportReceiveStream::GetStaticWrapperTypeInfo();This is clever I guess... but also kind of mixed feelings about this.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Adds the WebTransportReceiveStream interface surface from the W3C WebTransport spec section 9:
https://w3c.github.io/webtransport/#webtransportreceivestream
WebTransportReceiveStream is a ReadableStream subclass with a getStats()method returning WebTransportReceiveStreamStats. The interface is gated behind the new experimental WebTransportReceiveStream runtime flag.
This CL only adds the class, IDL, runtime flag, bindings/build
registration, and test expectations. It intentionally does not construct WebTransportReceiveStream objects yet. The follow-up CL, wires ReceiveStreamVendor and BidirectionalStream to construct WebTransportReceiveStream when the flag is enabled.
getStats() returns zeroed stats for now, matching the current
WebTransportSendStream stub pattern. Real Mojo-backed receive-stream stats are tracked separately. [Transferable] is also deferred until stream subclass transfer support exists.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |