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

LibWeb: Make factory method of FileAPI::Blob fallible

This commit is contained in:
Kenneth Myhra 2023-02-14 19:55:21 +01:00 committed by Linus Groh
parent bc02686ae9
commit 15917146d3
4 changed files with 5 additions and 5 deletions

View file

@ -15,9 +15,9 @@
namespace Web::FileAPI {
JS::NonnullGCPtr<Blob> Blob::create(JS::Realm& realm, ByteBuffer byte_buffer, DeprecatedString type)
WebIDL::ExceptionOr<JS::NonnullGCPtr<Blob>> Blob::create(JS::Realm& realm, ByteBuffer byte_buffer, DeprecatedString type)
{
return realm.heap().allocate<Blob>(realm, realm, move(byte_buffer), move(type)).release_allocated_value_but_fixme_should_propagate_errors();
return MUST_OR_THROW_OOM(realm.heap().allocate<Blob>(realm, realm, move(byte_buffer), move(type)));
}
// https://w3c.github.io/FileAPI/#convert-line-endings-to-native