Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2197c9117f451116809cf36bec7b9acdb0babb5e
      
https://github.com/WebKit/WebKit/commit/2197c9117f451116809cf36bec7b9acdb0babb5e
  Author: Youenn Fablet <[email protected]>
  Date:   2025-10-07 (Tue, 07 Oct 2025)

  Changed paths:
    M Source/WebCore/Modules/streams/ReadableStream.cpp
    M Source/WebCore/Modules/streams/ReadableStream.h
    M Source/WebCore/Modules/streams/ReadableStream.idl
    M Source/WebCore/Modules/streams/ReadableStreamBYOBReader.cpp
    M Source/WebCore/Modules/streams/ReadableStreamBYOBReader.h
    M Source/WebCore/Modules/streams/ReadableStreamBYOBReader.idl
    M Source/WebCore/Modules/streams/ReadableStreamDefaultReader.cpp
    M Source/WebCore/Modules/streams/ReadableStreamDefaultReader.h
    M Source/WebCore/Modules/streams/ReadableStreamDefaultReader.idl
    M Source/WebCore/Modules/streams/ReadableStreamInternals.js
    M Source/WebCore/Modules/streams/StreamPipeToUtilities.cpp
    M Source/WebCore/Modules/streams/StreamTeeUtilities.cpp
    M Source/WebCore/Modules/webtransport/WebTransportReceiveStream.cpp
    M Source/WebCore/Modules/webtransport/WebTransportReceiveStream.h
    M Source/WebCore/bindings/js/InternalReadableStream.cpp
    M Source/WebCore/bindings/js/InternalReadableStream.h
    M Source/WebCore/bindings/js/JSDOMConvertPromise.h
    M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
    M Source/WebCore/page/mac/EventHandlerMac.mm

  Log Message:
  -----------
  Remove the custom binding for ReadableStream cancel
rdar://161897092
https://bugs.webkit.org/show_bug.cgi?id=300107

Reviewed by Chris Dumez.

We do a refactoring to prepare ground for Readable byte stream native sources 
(especially fetch responses).
This patch does the following:
- Remove custom binding for ReadableStream and reader cancel methods. We update 
the binding generator so that methods can return their own promise. This is 
necessary to support the byte stream code path as well as the default stream 
code path (JS built-in).
- We do a small refactoring to simplify the construction of a 
ReadableStreamDefaultReader so that it always has a ReadableStream. This is now 
necessary for the cancel code path.
- We update getReader accordingly, which gets closer to the step-by-step spec.
- We make ReadableStream a ContextDestructionObserver so that we can get its 
JSDOMGlobalObject, which is used when cancelling with a DOMException (used by 
native sources).

We also update the conversion of DOMPromise to JSValue by using guardedObject() 
directly.
This removes hitting the ASSERT in DOMPromise::promise(), which is similar to 
the the regular JSDOMPromiseDeferred.h callPromiseFunction code path.

Covered by existing tests.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to