mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
LibWeb: Capture incoming reason argument
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.
This commit is contained in:
parent
514a2a1757
commit
26fe7a628c
Notes:
github-actions[bot]
2024-08-21 10:22:54 +00:00
Author: https://github.com/kennethmyhra
Commit: 26fe7a628c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1151
Reviewed-by: https://github.com/tcl3 ✅
3 changed files with 26 additions and 1 deletions
|
@ -0,0 +1,22 @@
|
|||
<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>
|
Loading…
Add table
Add a link
Reference in a new issue