mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00:00
AK+Everywhere: Make UTF-8 and UTF-32 to UTF-16 converters fallible
These could fail to allocate the underlying storage needed to store the UTF-16 data. Propagate these errors.
This commit is contained in:
parent
d8044c5358
commit
1edb96376b
13 changed files with 46 additions and 35 deletions
|
@ -33,7 +33,7 @@ NonnullRefPtr<Utf16StringImpl> Utf16StringImpl::create(Utf16Data string)
|
|||
|
||||
NonnullRefPtr<Utf16StringImpl> Utf16StringImpl::create(StringView string)
|
||||
{
|
||||
return create(AK::utf8_to_utf16(string));
|
||||
return create(AK::utf8_to_utf16(string).release_value_but_fixme_should_propagate_errors());
|
||||
}
|
||||
|
||||
NonnullRefPtr<Utf16StringImpl> Utf16StringImpl::create(Utf16View const& view)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue