Commit graph

16 commits

Author SHA1 Message Date
Shannon Booth
5f484d200a LibWeb: Port Stream algorithms from JS::SafeFunction to JS::HeapFunction 2024-01-27 21:40:25 -05:00
Shannon Booth
48aa9fbe07 LibWeb: Implement ReadableByteStreamController.enqueue 2023-12-03 20:26:14 +01:00
Shannon Booth
9d0700e770 LibWeb: Fix IDL getter for ReadableByteStreamController byobRequest
We were previously only returning the controllers current
[[byobRequest]] instead of taking into account pending pull intos.

Rename the getter function which would return the controllers
[[byobRequest]] slot to `raw_byob_request` to differentiate it from
the IDL getter.

This also leaves a FIXME for a spec step which we are also not currently
implementing correctly.
2023-12-03 20:26:14 +01:00
Shannon Booth
1e607f5775 LibWeb: Fix some missing initialize overrides for some Streams classes
This is some more motivation for me to get around to automatically
generate these initialize calls at some point.
2023-12-03 20:26:14 +01:00
Andreas Kling
bfd354492e LibWeb: Put most LibWeb GC objects in type-specific heap blocks
With this change, we now have ~1200 CellAllocators across both LibJS and
LibWeb in a normal WebContent instance.

This gives us a minimum heap size of 4.7 MiB in the scenario where we
only have one cell allocated per type. Of course, in practice there will
be many more of each type, so the effective overhead is quite a bit
smaller than that in practice.

I left a few types unconverted to this mechanism because I got tired of
doing this. :^)
2023-11-19 22:00:48 +01:00
Shannon Booth
8d4095d00e LibWeb: Add some const overloads in ReadableByteStreamController 2023-11-19 18:53:17 +01:00
Andreas Kling
9c3e9e8981 LibWeb/Streams: Make ReadRequest GC-allocated
This allows it to keep its edges alive. Fixes an intermittent crash seen
by UBSAN on CI. :^)
2023-08-09 19:16:07 +02:00
Matthew Olsson
dd65d60069 LibWeb: Use doubles for Stream's high_water_mark and queue_total_size
This matches the IDL types
2023-05-27 13:55:14 +02:00
Matthew Olsson
42fb847cc8 LibWeb: Use u64 for ReadableByteStream offsets instead of u32
These are specified in the IDL as "unsigned long long", which translates
to u64.
2023-05-27 13:55:14 +02:00
Matthew Olsson
ed06429d33 LibWeb: Implement ReadableByteStreamController.error() 2023-04-27 07:57:53 +02:00
Matthew Olsson
c9be755367 LibWeb: Implement ReadableByteStreamController.close() 2023-04-27 07:57:53 +02:00
Linus Groh
d192f44523 LibWeb/Streams: Make most algorithms return a NonnullGCPtr
Only the 'start algorithm' ever returns undefined (as a null GCPtr), so
let's type the others more strictly.
2023-04-14 16:35:17 +02:00
Matthew Olsson
bd7809cc18 LibWeb: Mostly implement ReadableByteStreamController.[[ReleaseSteps]] 2023-04-14 13:03:34 +02:00
Matthew Olsson
51abecc8bc LibWeb: Mostly implement ReadableByteStreamController.[[PullSteps]] 2023-04-14 13:03:34 +02:00
Matthew Olsson
c97f6b7701 LibWeb: Implement ReadableByteStreamController.[[CancelSteps]] 2023-04-14 13:03:34 +02:00
Matthew Olsson
819b6332d1 LibWeb: Add ReadableStreamByteController interface 2023-04-12 01:47:48 +02:00