mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +00:00
LibWeb: Make Fetch::Infrastructure::Body
be GC allocated
Making the body GC-allocated allows us to avoid using `JS::Handle` for `m_stream` in its members.
This commit is contained in:
parent
953c19bdb7
commit
bdd3a16b16
21 changed files with 117 additions and 91 deletions
|
@ -136,7 +136,7 @@ WebIDL::ExceptionOr<Infrastructure::BodyWithType> extract_body(JS::Realm& realm,
|
|||
// FIXME: 12. If action is non-null, then run these steps in parallel:
|
||||
|
||||
// 13. Let body be a body whose stream is stream, source is source, and length is length.
|
||||
auto body = Infrastructure::Body { JS::make_handle(*stream), move(source), move(length) };
|
||||
auto body = Infrastructure::Body::create(vm, *stream, move(source), move(length));
|
||||
|
||||
// 14. Return (body, type).
|
||||
return Infrastructure::BodyWithType { .body = move(body), .type = move(type) };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue