1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:28:11 +00:00

LibWeb: Port IDL implementations Blob and File to new String

This commit is contained in:
Kenneth Myhra 2023-02-25 10:27:38 +01:00 committed by Linus Groh
parent 31a9bd2bfd
commit 9a5a8d617d
10 changed files with 63 additions and 52 deletions

View file

@ -75,7 +75,7 @@ WebIDL::ExceptionOr<Infrastructure::BodyWithType> extract_body(JS::Realm& realm,
length = blob->size();
// If objects type attribute is not the empty byte sequence, set type to its value.
if (!blob->type().is_empty())
type = blob->type().to_byte_buffer();
type = TRY_OR_THROW_OOM(vm, ByteBuffer::copy(blob->type().bytes()));
return {};
},
[&](ReadonlyBytes bytes) -> WebIDL::ExceptionOr<void> {