mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-04 23:29:52 +00:00
LibURL+LibWeb: Make URL::serialize return a String
Simplifying a bunch of uneeded error handling around the place.
This commit is contained in:
parent
d7ac0601ab
commit
0fa54c2327
Notes:
github-actions[bot]
2024-12-04 16:48:13 +00:00
Author: https://github.com/shannonbooth
Commit: 0fa54c2327
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2727
Reviewed-by: https://github.com/AtkinsSJ ✅
52 changed files with 88 additions and 103 deletions
|
@ -72,7 +72,7 @@ WebIDL::ExceptionOr<FileReader::Result> FileReader::blob_package_data(JS::Realm&
|
|||
// Return bytes as a DataURL [RFC2397] subject to the considerations below:
|
||||
// Use mimeType as part of the Data URL if it is available in keeping with the Data URL specification [RFC2397].
|
||||
// If mimeType is not available return a Data URL without a media-type. [RFC2397].
|
||||
return MUST(URL::create_with_data(mime_type.value_or(String {}), MUST(encode_base64(bytes)), true).to_string());
|
||||
return URL::create_with_data(mime_type.value_or(String {}), MUST(encode_base64(bytes)), true).to_string();
|
||||
case Type::Text: {
|
||||
// 1. Let encoding be failure.
|
||||
Optional<StringView> encoding;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue