mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibWeb: Make more MimeSniff::MimeType APIs infallible
This commit is contained in:
parent
9a8db40a23
commit
88e7688940
Notes:
github-actions[bot]
2024-10-14 18:48:50 +00:00
Author: https://github.com/awesomekling
Commit: 88e7688940
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1796
14 changed files with 55 additions and 56 deletions
|
@ -126,7 +126,7 @@ WebIDL::ExceptionOr<JS::Value> package_data(JS::Realm& realm, ByteBuffer bytes,
|
|||
case PackageDataType::Blob: {
|
||||
// Return a Blob whose contents are bytes and type attribute is mimeType.
|
||||
// NOTE: If extracting the mime type returns failure, other browsers set it to an empty string - not sure if that's spec'd.
|
||||
auto mime_type_string = mime_type.has_value() ? MUST(mime_type->serialized()) : String {};
|
||||
auto mime_type_string = mime_type.has_value() ? mime_type->serialized() : String {};
|
||||
return FileAPI::Blob::create(realm, move(bytes), move(mime_type_string));
|
||||
}
|
||||
case PackageDataType::Uint8Array: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue