mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:27:34 +00:00
LibWeb: Properly convert UnderlyingSource's autoAllocateChunkSize to u64
The JS::Value being passed through is not a bigint, and needs to be converted using ConvertToInt, as per: https://webidl.spec.whatwg.org/#es-unsigned-long-long Furthermore, the IDL definition also specifies that this is associated with the [EnforceRange] extended attribute. This makes it actually possible to pass through an autoAllocateChunkSize to the ReadableStream constructor without it throwing a TypeError.
This commit is contained in:
parent
99bf986889
commit
6b88fc2e05
3 changed files with 18 additions and 2 deletions
|
@ -0,0 +1,10 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let stream = new ReadableStream({
|
||||
type: "bytes",
|
||||
autoAllocateChunkSize: 64
|
||||
});
|
||||
println(`PASS. Made: ${stream.constructor.name}`);
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue