mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-03 15:41:57 +00:00
Capture the incoming reason argument to transform_stream_default_source_cancel_algorithm() on the on_fulfilled_callback() of WebIDL::react_to_promise() on step 7.
22 lines
823 B
HTML
22 lines
823 B
HTML
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
const ts = new TransformStream();
|
|
ts.readable.cancel(new Error("error1"));
|
|
ts.writable.getWriter().closed.catch(e => {
|
|
println(`catch ${e}`);
|
|
});
|
|
|
|
const tsWithBackpressure = new TransformStream({}, undefined, { highWaterMark: 0 });
|
|
tsWithBackpressure.readable.cancel(new Error("error1"))
|
|
tsWithBackpressure.writable.getWriter().closed.catch(e => {
|
|
println(`catch ${e}`)
|
|
})
|
|
|
|
const tsWithoutBackpressure = new TransformStream({}, undefined, { highWaterMark: 1 });
|
|
tsWithoutBackpressure.readable.cancel(new Error("error1"))
|
|
tsWithoutBackpressure.writable.getWriter().closed.catch(e => {
|
|
println(`catch ${e}`)
|
|
})
|
|
});
|
|
</script>
|