Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e67a8c3c5b57de098125f98fa7c2238bf173dc98
      
https://github.com/WebKit/WebKit/commit/e67a8c3c5b57de098125f98fa7c2238bf173dc98
  Author: Alex Christensen <[email protected]>
  Date:   2026-07-17 (Fri, 17 Jul 2026)

  Changed paths:
    M Source/WebCore/Modules/streams/ReadableStream.cpp
    M Source/WebCore/Modules/streams/ReadableStream.h
    M Source/WebCore/Modules/webtransport/WebTransport.cpp
    M Source/WebCore/Modules/webtransport/WebTransport.h
    M Source/WebCore/Modules/webtransport/WebTransportReceiveStream.cpp
    M Source/WebCore/Modules/webtransport/WebTransportReceiveStream.h
    A 
Source/WebCore/Modules/webtransport/WebTransportReceiveStreamByteSource.cpp
    A Source/WebCore/Modules/webtransport/WebTransportReceiveStreamByteSource.h
    M Source/WebCore/Modules/webtransport/WebTransportReceiveStreamSource.cpp
    M Source/WebCore/Modules/webtransport/WebTransportReceiveStreamSource.h
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WebTransport.mm

  Log Message:
  -----------
  Fix WebTransport reading with byob streams
https://bugs.webkit.org/show_bug.cgi?id=319299

Reviewed by Youenn Fablet.

wpt/webtransport/streams-echo.https.any.html fails after 316945@main
is reapplied because this line of JS is throwing a TypeError:

const reader = bidi_stream.readable.getReader({mode: 'byob'});

It is throwing in ReadableStream::getReader with the string "Invalid mode is 
specified".
I keep WebTransportReceiveStream to be the source of stream streams 
(WebTransport's
incomingBidirectionalStreams and incomingUnidirectionalStreams)

WebTransportReceiveStreamByteSource is introduced.  It actually receives the 
bytes
from the network and gives them to JS as array buffers, and it supports byob 
buffers.

AI definitely helped me out with this one.

* Source/WebCore/Modules/streams/ReadableStream.cpp:
(WebCore::ReadableStream::createInternalReadableStream): Deleted.
* Source/WebCore/Modules/streams/ReadableStream.h:
* Source/WebCore/Modules/webtransport/WebTransport.cpp:
(WebCore::WebTransport::receiveIncomingUnidirectionalStream):
(WebCore::createBidirectionalStream):
(WebCore::WebTransport::receiveBidirectionalStream):
(WebCore::WebTransport::createBidirectionalStream):
* Source/WebCore/Modules/webtransport/WebTransport.h:
* Source/WebCore/Modules/webtransport/WebTransportReceiveStream.cpp:
(WebCore::WebTransportReceiveStream::create):
(WebCore::WebTransportReceiveStream::WebTransportReceiveStream):
* Source/WebCore/Modules/webtransport/WebTransportReceiveStream.h:
* Source/WebCore/Modules/webtransport/WebTransportReceiveStreamByteSource.cpp: 
Copied from 
Source/WebCore/Modules/webtransport/WebTransportReceiveStreamSource.cpp.
(WebCore::WebTransportReceiveStreamByteSource::pull):
(WebCore::WebTransportReceiveStreamByteSource::WebTransportReceiveStreamByteSource):
(WebCore::WebTransportReceiveStreamByteSource::receiveBytes):
(WebCore::WebTransportReceiveStreamByteSource::receiveError):
(WebCore::WebTransportReceiveStreamByteSource::cancel):
* Source/WebCore/Modules/webtransport/WebTransportReceiveStreamByteSource.h: 
Copied from 
Source/WebCore/Modules/webtransport/WebTransportReceiveStreamSource.h.
* Source/WebCore/Modules/webtransport/WebTransportReceiveStreamSource.cpp:
(WebCore::WebTransportReceiveStreamSource::receiveIncomingStream):
(WebCore::WebTransportReceiveStreamSource::doCancel):
(WebCore::WebTransportReceiveStreamSource::WebTransportReceiveStreamSource): 
Deleted.
(WebCore::WebTransportReceiveStreamSource::receiveBytes): Deleted.
(WebCore::WebTransportReceiveStreamSource::receiveError): Deleted.
* Source/WebCore/Modules/webtransport/WebTransportReceiveStreamSource.h:
(WebCore::WebTransportReceiveStreamSource::createIncomingStreamsSource):
(WebCore::WebTransportReceiveStreamSource::createIncomingDataSource): Deleted.
(WebCore::WebTransportReceiveStreamSource::setStream): Deleted.
(WebCore::WebTransportReceiveStreamSource::stream const): Deleted.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WebTransport.mm:
(TestWebKitAPI::TEST(WebTransport, ClientBidirectionalBYOB)):

Canonical link: https://commits.webkit.org/317416@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to