diff --git a/Userland/Libraries/LibWeb/Fetch/BodyInit.cpp b/Userland/Libraries/LibWeb/Fetch/BodyInit.cpp index 77cb4186ddd..336e28b8bc3 100644 --- a/Userland/Libraries/LibWeb/Fetch/BodyInit.cpp +++ b/Userland/Libraries/LibWeb/Fetch/BodyInit.cpp @@ -80,43 +80,43 @@ WebIDL::ExceptionOr extract_body(JS::Realm& realm, length = blob->size(); // If object’s type attribute is not the empty byte sequence, set type to its value. if (!blob->type().is_empty()) - type = TRY_OR_THROW_OOM(vm, ByteBuffer::copy(blob->type().bytes())); + type = MUST(ByteBuffer::copy(blob->type().bytes())); return {}; }, [&](ReadonlyBytes bytes) -> WebIDL::ExceptionOr { // Set source to object. - source = TRY_OR_THROW_OOM(vm, ByteBuffer::copy(bytes)); + source = MUST(ByteBuffer::copy(bytes)); return {}; }, [&](JS::Handle const& buffer_source) -> WebIDL::ExceptionOr { // Set source to a copy of the bytes held by object. - source = TRY_OR_THROW_OOM(vm, WebIDL::get_buffer_source_copy(*buffer_source->raw_object())); + source = MUST(WebIDL::get_buffer_source_copy(*buffer_source->raw_object())); return {}; }, [&](JS::Handle const& form_data) -> WebIDL::ExceptionOr { // Set action to this step: run the multipart/form-data encoding algorithm, with object’s entry list and UTF-8. - auto serialized_form_data = TRY_OR_THROW_OOM(vm, HTML::serialize_to_multipart_form_data(form_data->entry_list())); + auto serialized_form_data = MUST(HTML::serialize_to_multipart_form_data(form_data->entry_list())); // Set source to object. source = serialized_form_data.serialized_data; // FIXME: Set length to unclear, see html/6424 for improving this. // Set type to `multipart/form-data; boundary=`, followed by the multipart/form-data boundary string generated by the multipart/form-data encoding algorithm. - type = TRY_OR_THROW_OOM(vm, ByteBuffer::copy(TRY_OR_THROW_OOM(vm, String::formatted("multipart/form-data; boundary={}"sv, serialized_form_data.boundary)).bytes())); + type = MUST(ByteBuffer::copy(MUST(String::formatted("multipart/form-data; boundary={}"sv, serialized_form_data.boundary)).bytes())); return {}; }, [&](JS::Handle const& url_search_params) -> WebIDL::ExceptionOr { // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. auto search_params_string = TRY(url_search_params->to_string()); - source = TRY_OR_THROW_OOM(vm, ByteBuffer::copy(search_params_string.bytes())); + source = MUST(ByteBuffer::copy(search_params_string.bytes())); // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. - type = TRY_OR_THROW_OOM(vm, ByteBuffer::copy("application/x-www-form-urlencoded;charset=UTF-8"sv.bytes())); + type = MUST(ByteBuffer::copy("application/x-www-form-urlencoded;charset=UTF-8"sv.bytes())); return {}; }, [&](String const& scalar_value_string) -> WebIDL::ExceptionOr { // NOTE: AK::String is always UTF-8. // Set source to the UTF-8 encoding of object. - source = TRY_OR_THROW_OOM(vm, ByteBuffer::copy(scalar_value_string.bytes())); + source = MUST(ByteBuffer::copy(scalar_value_string.bytes())); // Set type to `text/plain;charset=UTF-8`. - type = TRY_OR_THROW_OOM(vm, ByteBuffer::copy("text/plain;charset=UTF-8"sv.bytes())); + type = MUST(ByteBuffer::copy("text/plain;charset=UTF-8"sv.bytes())); return {}; }, [&](JS::Handle const& stream) -> WebIDL::ExceptionOr {