haikuwebkit/Source/WebCore/Modules/streams
Alexey Shvayka 46613c1515 ReadableStream's pipeTo() and pipeThrough() don't properly check for AbortSignal
https://bugs.webkit.org/show_bug.cgi?id=227693

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

* web-platform-tests/streams/piping/abort.any-expected.txt:
* web-platform-tests/streams/piping/abort.any.worker-expected.txt:
* web-platform-tests/streams/piping/pipe-through.any-expected.txt:
* web-platform-tests/streams/piping/pipe-through.any.worker-expected.txt:

Source/WebCore:

This patch introduces @isAbortSignal global private function to replace `instanceof`
checks that a) were false positive for `Object.create(AbortSignal.prototype)` and
b) observably performed [[GetPrototypeOf]] and Symbol.hasInstance lookup / call.

Aligns WebKit with Blink and the spec (https://heycam.github.io/webidl/#implements).

Test: imported/w3c/web-platform-tests/streams/piping/abort.any.js

* Modules/streams/ReadableStream.js:
(pipeThrough):
(pipeTo):
* Modules/streams/ReadableStreamInternals.js:
(readableStreamPipeToWritableStream):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSC_DEFINE_HOST_FUNCTION):
(WebCore::JSDOMGlobalObject::addBuiltinGlobals):
* bindings/js/WebCoreBuiltinNames.h:


Canonical link: https://commits.webkit.org/240240@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-04 04:49:52 +00:00
..
ByteLengthQueuingStrategy.idl
ByteLengthQueuingStrategy.js
CountQueuingStrategy.idl
CountQueuingStrategy.js CountQueuingStrategy.constructor misses checking the type of init param 2021-06-10 17:06:06 +00:00
ReadableByteStreamController.idl
ReadableByteStreamController.js
ReadableByteStreamInternals.js
ReadableStream.idl
ReadableStream.js ReadableStream's pipeTo() and pipeThrough() don't properly check for AbortSignal 2021-08-04 04:49:52 +00:00
ReadableStreamBYOBReader.idl
ReadableStreamBYOBReader.js
ReadableStreamBYOBRequest.idl
ReadableStreamBYOBRequest.js
ReadableStreamDefaultController.idl
ReadableStreamDefaultController.js
ReadableStreamDefaultReader.idl
ReadableStreamDefaultReader.js
ReadableStreamInternals.js ReadableStream's pipeTo() and pipeThrough() don't properly check for AbortSignal 2021-08-04 04:49:52 +00:00
ReadableStreamSink.cpp Replace ReadableStreamChunk struct with a WTF::Span 2021-06-10 18:53:20 +00:00
ReadableStreamSink.h Replace ReadableStreamChunk struct with a WTF::Span 2021-06-10 18:53:20 +00:00
ReadableStreamSink.idl
ReadableStreamSource.cpp
ReadableStreamSource.h Remove <wtf/Optional.h> 2021-06-02 06:45:51 +00:00
ReadableStreamSource.idl
StreamInternals.js ReadableStream.getReader do not throw a proper exception when parameter is of wrong type 2021-07-01 17:41:51 +00:00
TransformStream.idl
TransformStream.js
TransformStreamDefaultController.idl
TransformStreamDefaultController.js
TransformStreamInternals.js
WritableStream.idl
WritableStream.js
WritableStreamDefaultController.idl
WritableStreamDefaultController.js
WritableStreamDefaultWriter.idl
WritableStreamDefaultWriter.js
WritableStreamInternals.js
WritableStreamSink.h
WritableStreamSink.idl