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
Andrew Kaster
d361221657 LibJS+LibWeb: Add JS::Value constructor for `JS::Handle<T>`
Similar to the constructors for ``JS::{Nonnull}GCPtr<T>``, this helper
avoids unnecessary .ptr() clutter when we want to construct Values.
2023-12-19 09:21:55 -07:00
Shannon Booth
96af80acd1 LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05: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
Timothy Flynn
54d1f4e234 LibJS: Stop propagating small OOM errors from the Error object 2023-09-09 13:03:25 -04:00
Andreas Kling
72c9f56c66 LibJS: Make Heap::allocate<T>() infallible
Stop worrying about tiny OOMs. Work towards #20449.

While going through these, I also changed the function signature in many
places where returning ThrowCompletionOr<T> is no longer necessary.
2023-08-13 15:38:42 +02:00
Andreas Kling
18c54d8d40 LibJS: Make Cell::initialize() return void
Stop worrying about tiny OOMs.

Work towards #20405
2023-08-08 07:39:11 +02:00
Shannon Booth
9cb4bf0683 LibWeb: Implement QueuingStrategy for Web::Streams::WritableStream 2023-06-22 06:58:23 +02:00
Matthew Olsson
d824d07784 LibWeb: Fix inverted condition in WritableStream's constructor 2023-04-17 10:27:40 +02:00
Matthew Olsson
0a220a19da LibWeb: Set up the DefaultController when constructing a WritableStream 2023-04-10 00:45:03 +02:00
Matthew Olsson
c421b6113c LibWeb: Implement WritableStream.abort() 2023-04-09 21:45:39 +02:00
Matthew Olsson
ae2d67c28b LibWeb: Implement WritableStream.getWriter() 2023-04-09 21:45:39 +02:00
Matthew Olsson
5faa0014f2 LibWeb: Implement WritableStream.close() 2023-04-09 18:37:34 +02:00
Matthew Olsson
868cd95069 LibWeb: Add the WritableStreamDefaultController 2023-04-09 17:14:48 +02:00
Matthew Olsson
bdab61ad93 LibWeb: Add the WritableStreamDefaultWriter interface 2023-04-06 22:54:58 +02:00
Matthew Olsson
e93560b769 LibWeb: Add the WritableStream interface 2023-04-06 22:54:58 +02:00