mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
Previously, we added a `reader.closed()` promise reaction during every `ReadableStreamPipeTo::process()` call, which meant allocating a new reaction objects for every processed chunk and retaining all of them until the stream closed. The same issue existed for `writer.closed()` inside `ReadableStreamPipeTo::read_chunk()`. This change registers a single shutdown handler for both the reader and the writer in the ReadableStreamPipeTo constructor.
2.3 KiB
2.3 KiB