mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02:00
LibWeb/Streams: Make ReadRequest GC-allocated
This allows it to keep its edges alive. Fixes an intermittent crash seen by UBSAN on CI. :^)
This commit is contained in:
Notes:
sideshowbarker
2024-07-16 20:12:13 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/9c3e9e8981 Pull-request: https://github.com/SerenityOS/serenity/pull/20459
@@ -320,7 +320,7 @@ void readable_stream_error(ReadableStream& stream, JS::Value error)
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#readable-stream-add-read-request
|
||||
void readable_stream_add_read_request(ReadableStream& stream, ReadRequest const& read_request)
|
||||
void readable_stream_add_read_request(ReadableStream& stream, ReadRequest& read_request)
|
||||
{
|
||||
// 1. Assert: stream.[[reader]] implements ReadableStreamDefaultReader.
|
||||
VERIFY(stream.reader().has_value() && stream.reader()->has<JS::NonnullGCPtr<ReadableStreamDefaultReader>>());
|
||||
@@ -1032,7 +1032,7 @@ void readable_byte_stream_controller_error(ReadableByteStreamController& control
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#abstract-opdef-readablebytestreamcontrollerfillreadrequestfromqueue
|
||||
WebIDL::ExceptionOr<void> readable_byte_stream_controller_fill_read_request_from_queue(ReadableByteStreamController& controller, NonnullRefPtr<ReadRequest> read_request)
|
||||
WebIDL::ExceptionOr<void> readable_byte_stream_controller_fill_read_request_from_queue(ReadableByteStreamController& controller, JS::NonnullGCPtr<ReadRequest> read_request)
|
||||
{
|
||||
auto& vm = controller.vm();
|
||||
auto& realm = controller.realm();
|
||||
|
||||
Reference in New Issue
Block a user