Commit 36d95d9a authored by Adam Rice's avatar Adam Rice Committed by Commit Bot

[Streams] Implement aborting for pipes

Implement the { signal } option for ReadableStream pipeThrough and
pipeTo, permitted a pipe to be aborted.

Fixed: 902939
Change-Id: I168b3ac2c3f803cdd12611bea05c1ea706824a4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899628Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712931}
parent 386b55a7
......@@ -10,10 +10,12 @@
#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
#include "third_party/blink/renderer/core/streams/readable_stream.h"
#include "third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h"
#include "third_party/blink/renderer/platform/heap/heap.h"
#include "v8/include/v8.h"
namespace blink {
class AbortSignal;
class ExceptionState;
class ReadableStreamDefaultController;
class ReadableStreamReader;
......@@ -30,11 +32,30 @@ class WritableStreamNative;
// See https://streams.spec.whatwg.org/#rs-model for background.
class ReadableStreamNative : public ReadableStream {
public:
struct PipeOptions {
PipeOptions() = default;
bool prevent_close = false;
bool prevent_abort = false;
bool prevent_cancel = false;
class PipeOptions : public GarbageCollected<PipeOptions> {
public:
PipeOptions();
PipeOptions(ScriptState* script_state,
ScriptValue options,
ExceptionState& exception_state);
bool PreventClose() const { return prevent_close_; }
bool PreventAbort() const { return prevent_abort_; }
bool PreventCancel() const { return prevent_cancel_; }
AbortSignal* Signal() const { return signal_; }
void Trace(Visitor*);
private:
bool GetBoolean(ScriptState* script_state,
v8::Local<v8::Object> dictionary,
const char* property_name,
ExceptionState& exception_state);
bool prevent_close_ = false;
bool prevent_abort_ = false;
bool prevent_cancel_ = false;
Member<AbortSignal> signal_;
};
enum State : uint8_t { kReadable, kClosed, kErrored };
......@@ -167,7 +188,7 @@ class ReadableStreamNative : public ReadableStream {
static ScriptPromise PipeTo(ScriptState*,
ReadableStreamNative*,
WritableStreamNative*,
PipeOptions);
PipeOptions*);
//
// Functions exported for use by TransformStream. Not part of the standard.
......
......@@ -211,7 +211,8 @@ void WritableStreamNative::Serialize(ScriptState* script_state,
}
auto promise = ReadableStreamNative::PipeTo(
script_state, readable, this, ReadableStreamNative::PipeOptions());
script_state, readable, this,
MakeGarbageCollected<ReadableStreamNative::PipeOptions>());
promise.MarkAsHandled();
}
......
This is a testharness.js-based test.
FAIL a signal argument 'null' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL a signal argument 'AbortSignal' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL a signal argument 'true' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL a signal argument '-1' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL a signal argument '[object AbortSignal]' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL an aborted signal should cause the writable stream to reject with an AbortError assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL all the AbortError objects should be the same object promise_test: Unhandled rejection with value: "failed to abort"
FAIL preventCancel should prevent canceling the readable assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL preventAbort should prevent aborting the readable assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL preventCancel and preventAbort should prevent canceling the readable and aborting the readable assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL abort should prevent further reads assert_unreached: Should have rejected: pipeTo should reject Reached unreachable code
FAIL all pending writes should complete on abort assert_unreached: Should have rejected: pipeTo should reject Reached unreachable code
FAIL a rejection from underlyingSource.cancel() should be returned by pipeTo() assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
PASS a rejection from underlyingSink.abort() should be returned by pipeTo()
FAIL a rejection from underlyingSink.abort() should be preferred to one from underlyingSource.cancel() assert_array_equals: abort() should be called before cancel() lengths differ, expected 2 got 1
FAIL abort signal takes priority over closed readable assert_unreached: Should have rejected: pipeTo should reject Reached unreachable code
FAIL abort signal takes priority over errored readable assert_throws: pipeTo should reject function "function() { throw e }" threw object "error1: error1" that is not a DOMException AbortError: property "code" is equal to undefined, expected 20
FAIL abort signal takes priority over closed writable assert_throws: pipeTo should reject function "function() { throw e }" threw object "TypeError: Destination stream closed" that is not a DOMException AbortError: property "code" is equal to undefined, expected 20
FAIL abort signal takes priority over errored writable assert_throws: pipeTo should reject function "function() { throw e }" threw object "error1: error1" that is not a DOMException AbortError: property "code" is equal to undefined, expected 20
PASS abort should do nothing after the readable is closed
PASS abort should do nothing after the readable is errored
PASS abort should do nothing after the readable is errored, even with pending writes
PASS abort should do nothing after the writable is errored
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL a signal argument 'null' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL a signal argument 'AbortSignal' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL a signal argument 'true' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL a signal argument '-1' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL a signal argument '[object AbortSignal]' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL an aborted signal should cause the writable stream to reject with an AbortError assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL all the AbortError objects should be the same object promise_test: Unhandled rejection with value: "failed to abort"
FAIL preventCancel should prevent canceling the readable assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL preventAbort should prevent aborting the readable assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL preventCancel and preventAbort should prevent canceling the readable and aborting the readable assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL abort should prevent further reads assert_unreached: Should have rejected: pipeTo should reject Reached unreachable code
FAIL all pending writes should complete on abort assert_unreached: Should have rejected: pipeTo should reject Reached unreachable code
FAIL a rejection from underlyingSource.cancel() should be returned by pipeTo() assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
PASS a rejection from underlyingSink.abort() should be returned by pipeTo()
FAIL a rejection from underlyingSink.abort() should be preferred to one from underlyingSource.cancel() assert_array_equals: abort() should be called before cancel() lengths differ, expected 2 got 1
FAIL abort signal takes priority over closed readable assert_unreached: Should have rejected: pipeTo should reject Reached unreachable code
FAIL abort signal takes priority over errored readable assert_throws: pipeTo should reject function "function() { throw e }" threw object "error1: error1" that is not a DOMException AbortError: property "code" is equal to undefined, expected 20
FAIL abort signal takes priority over closed writable assert_throws: pipeTo should reject function "function() { throw e }" threw object "TypeError: Destination stream closed" that is not a DOMException AbortError: property "code" is equal to undefined, expected 20
FAIL abort signal takes priority over errored writable assert_throws: pipeTo should reject function "function() { throw e }" threw object "error1: error1" that is not a DOMException AbortError: property "code" is equal to undefined, expected 20
PASS abort should do nothing after the readable is closed
PASS abort should do nothing after the readable is errored
PASS abort should do nothing after the readable is errored, even with pending writes
PASS abort should do nothing after the writable is errored
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL a signal argument 'null' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL a signal argument 'AbortSignal' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL a signal argument 'true' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL a signal argument '-1' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL a signal argument '[object AbortSignal]' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL an aborted signal should cause the writable stream to reject with an AbortError assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL all the AbortError objects should be the same object promise_test: Unhandled rejection with value: "failed to abort"
FAIL preventCancel should prevent canceling the readable assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL preventAbort should prevent aborting the readable assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL preventCancel and preventAbort should prevent canceling the readable and aborting the readable assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL abort should prevent further reads assert_unreached: Should have rejected: pipeTo should reject Reached unreachable code
FAIL all pending writes should complete on abort assert_unreached: Should have rejected: pipeTo should reject Reached unreachable code
FAIL a rejection from underlyingSource.cancel() should be returned by pipeTo() assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
PASS a rejection from underlyingSink.abort() should be returned by pipeTo()
FAIL a rejection from underlyingSink.abort() should be preferred to one from underlyingSource.cancel() assert_array_equals: abort() should be called before cancel() lengths differ, expected 2 got 1
FAIL abort signal takes priority over closed readable assert_unreached: Should have rejected: pipeTo should reject Reached unreachable code
FAIL abort signal takes priority over errored readable assert_throws: pipeTo should reject function "function() { throw e }" threw object "error1: error1" that is not a DOMException AbortError: property "code" is equal to undefined, expected 20
FAIL abort signal takes priority over closed writable assert_throws: pipeTo should reject function "function() { throw e }" threw object "TypeError: Destination stream closed" that is not a DOMException AbortError: property "code" is equal to undefined, expected 20
FAIL abort signal takes priority over errored writable assert_throws: pipeTo should reject function "function() { throw e }" threw object "error1: error1" that is not a DOMException AbortError: property "code" is equal to undefined, expected 20
PASS abort should do nothing after the readable is closed
PASS abort should do nothing after the readable is errored
PASS abort should do nothing after the readable is errored, even with pending writes
PASS abort should do nothing after the writable is errored
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL a signal argument 'null' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL a signal argument 'AbortSignal' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL a signal argument 'true' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL a signal argument '-1' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL a signal argument '[object AbortSignal]' should cause pipeTo() to reject assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL an aborted signal should cause the writable stream to reject with an AbortError assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL all the AbortError objects should be the same object promise_test: Unhandled rejection with value: "failed to abort"
FAIL preventCancel should prevent canceling the readable assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL preventAbort should prevent aborting the readable assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL preventCancel and preventAbort should prevent canceling the readable and aborting the readable assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
FAIL abort should prevent further reads assert_unreached: Should have rejected: pipeTo should reject Reached unreachable code
FAIL all pending writes should complete on abort assert_unreached: Should have rejected: pipeTo should reject Reached unreachable code
FAIL a rejection from underlyingSource.cancel() should be returned by pipeTo() assert_throws: pipeTo should reject function "function() { throw e }" threw "failed to abort" with type "string", not an object
PASS a rejection from underlyingSink.abort() should be returned by pipeTo()
FAIL a rejection from underlyingSink.abort() should be preferred to one from underlyingSource.cancel() assert_array_equals: abort() should be called before cancel() lengths differ, expected 2 got 1
FAIL abort signal takes priority over closed readable assert_unreached: Should have rejected: pipeTo should reject Reached unreachable code
FAIL abort signal takes priority over errored readable assert_throws: pipeTo should reject function "function() { throw e }" threw object "error1: error1" that is not a DOMException AbortError: property "code" is equal to undefined, expected 20
FAIL abort signal takes priority over closed writable assert_throws: pipeTo should reject function "function() { throw e }" threw object "TypeError: Destination stream closed" that is not a DOMException AbortError: property "code" is equal to undefined, expected 20
FAIL abort signal takes priority over errored writable assert_throws: pipeTo should reject function "function() { throw e }" threw object "error1: error1" that is not a DOMException AbortError: property "code" is equal to undefined, expected 20
PASS abort should do nothing after the readable is closed
PASS abort should do nothing after the readable is errored
PASS abort should do nothing after the readable is errored, even with pending writes
PASS abort should do nothing after the writable is errored
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS Piping through a duck-typed pass-through transform stream should work
PASS Piping through a transform errored on the writable end does not cause an unhandled promise rejection
PASS pipeThrough should not call pipeTo on this
PASS pipeThrough should not call pipeTo on the ReadableStream prototype
PASS pipeThrough should brand-check this and not allow 'null'
PASS pipeThrough should brand-check readable and not allow 'null'
PASS pipeThrough should brand-check this and not allow 'undefined'
PASS pipeThrough should brand-check readable and not allow 'undefined'
PASS pipeThrough should brand-check this and not allow '0'
PASS pipeThrough should brand-check readable and not allow '0'
PASS pipeThrough should brand-check this and not allow 'NaN'
PASS pipeThrough should brand-check readable and not allow 'NaN'
PASS pipeThrough should brand-check this and not allow 'true'
PASS pipeThrough should brand-check readable and not allow 'true'
PASS pipeThrough should brand-check this and not allow 'ReadableStream'
PASS pipeThrough should brand-check readable and not allow 'ReadableStream'
PASS pipeThrough should brand-check this and not allow '[object ReadableStream]'
PASS pipeThrough should brand-check readable and not allow '[object ReadableStream]'
PASS pipeThrough should brand-check writable and not allow 'null'
PASS pipeThrough should brand-check writable and not allow 'undefined'
PASS pipeThrough should brand-check writable and not allow '0'
PASS pipeThrough should brand-check writable and not allow 'NaN'
PASS pipeThrough should brand-check writable and not allow 'true'
PASS pipeThrough should brand-check writable and not allow 'WritableStream'
PASS pipeThrough should brand-check writable and not allow '[object WritableStream]'
PASS pipeThrough should rethrow errors from accessing readable or writable
FAIL invalid values of signal should throw; specifically 'null' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically '0' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically 'NaN' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically 'true' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically 'AbortSignal' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically '[object AbortSignal]' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
PASS pipeThrough should accept a real AbortSignal
PASS pipeThrough should throw if this is locked
PASS pipeThrough should throw if writable is locked
PASS pipeThrough should not care if readable is locked
PASS preventCancel should work
PASS preventClose should work
PASS preventAbort should work
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS Piping through a duck-typed pass-through transform stream should work
PASS Piping through a transform errored on the writable end does not cause an unhandled promise rejection
PASS pipeThrough should not call pipeTo on this
PASS pipeThrough should not call pipeTo on the ReadableStream prototype
PASS pipeThrough should brand-check this and not allow 'null'
PASS pipeThrough should brand-check readable and not allow 'null'
PASS pipeThrough should brand-check this and not allow 'undefined'
PASS pipeThrough should brand-check readable and not allow 'undefined'
PASS pipeThrough should brand-check this and not allow '0'
PASS pipeThrough should brand-check readable and not allow '0'
PASS pipeThrough should brand-check this and not allow 'NaN'
PASS pipeThrough should brand-check readable and not allow 'NaN'
PASS pipeThrough should brand-check this and not allow 'true'
PASS pipeThrough should brand-check readable and not allow 'true'
PASS pipeThrough should brand-check this and not allow 'ReadableStream'
PASS pipeThrough should brand-check readable and not allow 'ReadableStream'
PASS pipeThrough should brand-check this and not allow '[object ReadableStream]'
PASS pipeThrough should brand-check readable and not allow '[object ReadableStream]'
PASS pipeThrough should brand-check writable and not allow 'null'
PASS pipeThrough should brand-check writable and not allow 'undefined'
PASS pipeThrough should brand-check writable and not allow '0'
PASS pipeThrough should brand-check writable and not allow 'NaN'
PASS pipeThrough should brand-check writable and not allow 'true'
PASS pipeThrough should brand-check writable and not allow 'WritableStream'
PASS pipeThrough should brand-check writable and not allow '[object WritableStream]'
PASS pipeThrough should rethrow errors from accessing readable or writable
FAIL invalid values of signal should throw; specifically 'null' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically '0' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically 'NaN' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically 'true' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically 'AbortSignal' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically '[object AbortSignal]' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
PASS pipeThrough should accept a real AbortSignal
PASS pipeThrough should throw if this is locked
PASS pipeThrough should throw if writable is locked
PASS pipeThrough should not care if readable is locked
PASS preventCancel should work
PASS preventClose should work
PASS preventAbort should work
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS Piping through a duck-typed pass-through transform stream should work
PASS Piping through a transform errored on the writable end does not cause an unhandled promise rejection
PASS pipeThrough should not call pipeTo on this
PASS pipeThrough should not call pipeTo on the ReadableStream prototype
PASS pipeThrough should brand-check this and not allow 'null'
PASS pipeThrough should brand-check readable and not allow 'null'
PASS pipeThrough should brand-check this and not allow 'undefined'
PASS pipeThrough should brand-check readable and not allow 'undefined'
PASS pipeThrough should brand-check this and not allow '0'
PASS pipeThrough should brand-check readable and not allow '0'
PASS pipeThrough should brand-check this and not allow 'NaN'
PASS pipeThrough should brand-check readable and not allow 'NaN'
PASS pipeThrough should brand-check this and not allow 'true'
PASS pipeThrough should brand-check readable and not allow 'true'
PASS pipeThrough should brand-check this and not allow 'ReadableStream'
PASS pipeThrough should brand-check readable and not allow 'ReadableStream'
PASS pipeThrough should brand-check this and not allow '[object ReadableStream]'
PASS pipeThrough should brand-check readable and not allow '[object ReadableStream]'
PASS pipeThrough should brand-check writable and not allow 'null'
PASS pipeThrough should brand-check writable and not allow 'undefined'
PASS pipeThrough should brand-check writable and not allow '0'
PASS pipeThrough should brand-check writable and not allow 'NaN'
PASS pipeThrough should brand-check writable and not allow 'true'
PASS pipeThrough should brand-check writable and not allow 'WritableStream'
PASS pipeThrough should brand-check writable and not allow '[object WritableStream]'
PASS pipeThrough should rethrow errors from accessing readable or writable
FAIL invalid values of signal should throw; specifically 'null' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically '0' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically 'NaN' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically 'true' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically 'AbortSignal' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically '[object AbortSignal]' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
PASS pipeThrough should accept a real AbortSignal
PASS pipeThrough should throw if this is locked
PASS pipeThrough should throw if writable is locked
PASS pipeThrough should not care if readable is locked
PASS preventCancel should work
PASS preventClose should work
PASS preventAbort should work
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS Piping through a duck-typed pass-through transform stream should work
PASS Piping through a transform errored on the writable end does not cause an unhandled promise rejection
PASS pipeThrough should not call pipeTo on this
PASS pipeThrough should not call pipeTo on the ReadableStream prototype
PASS pipeThrough should brand-check this and not allow 'null'
PASS pipeThrough should brand-check readable and not allow 'null'
PASS pipeThrough should brand-check this and not allow 'undefined'
PASS pipeThrough should brand-check readable and not allow 'undefined'
PASS pipeThrough should brand-check this and not allow '0'
PASS pipeThrough should brand-check readable and not allow '0'
PASS pipeThrough should brand-check this and not allow 'NaN'
PASS pipeThrough should brand-check readable and not allow 'NaN'
PASS pipeThrough should brand-check this and not allow 'true'
PASS pipeThrough should brand-check readable and not allow 'true'
PASS pipeThrough should brand-check this and not allow 'ReadableStream'
PASS pipeThrough should brand-check readable and not allow 'ReadableStream'
PASS pipeThrough should brand-check this and not allow '[object ReadableStream]'
PASS pipeThrough should brand-check readable and not allow '[object ReadableStream]'
PASS pipeThrough should brand-check writable and not allow 'null'
PASS pipeThrough should brand-check writable and not allow 'undefined'
PASS pipeThrough should brand-check writable and not allow '0'
PASS pipeThrough should brand-check writable and not allow 'NaN'
PASS pipeThrough should brand-check writable and not allow 'true'
PASS pipeThrough should brand-check writable and not allow 'WritableStream'
PASS pipeThrough should brand-check writable and not allow '[object WritableStream]'
PASS pipeThrough should rethrow errors from accessing readable or writable
FAIL invalid values of signal should throw; specifically 'null' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically '0' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically 'NaN' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically 'true' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically 'AbortSignal' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
FAIL invalid values of signal should throw; specifically '[object AbortSignal]' assert_throws: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
PASS pipeThrough should accept a real AbortSignal
PASS pipeThrough should throw if this is locked
PASS pipeThrough should throw if writable is locked
PASS pipeThrough should not care if readable is locked
PASS preventCancel should work
PASS preventClose should work
PASS preventAbort should work
Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment