summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/XHR
diff options
context:
space:
mode:
authorKenneth Myhra <kennethmyhra@gmail.com>2023-02-14 19:55:21 +0100
committerLinus Groh <mail@linusgroh.de>2023-02-18 00:52:47 +0100
commit15917146d3ae20cedd6571b8250b772bc1575d11 (patch)
tree73760cfb5559d9785a9b1537d64644a203df7638 /Userland/Libraries/LibWeb/XHR
parentbc02686ae966bfa35374c54b07b1a9141eb4ee36 (diff)
downloadserenity-15917146d3ae20cedd6571b8250b772bc1575d11.zip
LibWeb: Make factory method of FileAPI::Blob fallible
Diffstat (limited to 'Userland/Libraries/LibWeb/XHR')
-rw-r--r--Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp
index 4182badfed..a6ac6ae150 100644
--- a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp
+++ b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp
@@ -161,7 +161,7 @@ WebIDL::ExceptionOr<JS::Value> XMLHttpRequest::response()
}
// 6. Otherwise, if this’s response type is "blob", set this’s response object to a new Blob object representing this’s received bytes with type set to the result of get a final MIME type for this.
else if (m_response_type == Bindings::XMLHttpRequestResponseType::Blob) {
- auto blob_part = FileAPI::Blob::create(realm(), m_received_bytes, get_final_mime_type().type());
+ auto blob_part = TRY(FileAPI::Blob::create(realm(), m_received_bytes, get_final_mime_type().type()));
auto blob = TRY(FileAPI::Blob::create(realm(), Vector<FileAPI::BlobPart> { JS::make_handle(*blob_part) }));
m_response_object = JS::Value(blob.ptr());
}