diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-01-06 13:19:34 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-08 12:13:15 +0100 |
commit | 1edb96376b51519fe9a7aff2d281f243ca19fd45 (patch) | |
tree | 6c1cafa408e6640a02f64d1c626c796a42bc95ea /Userland/Libraries/LibJS/Runtime/Utf16String.cpp | |
parent | d8044c5358ab8440286f39c3d1efe2c5f39bc115 (diff) | |
download | serenity-1edb96376b51519fe9a7aff2d281f243ca19fd45.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Utf16String.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Utf16String.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Utf16String.cpp b/Userland/Libraries/LibJS/Runtime/Utf16String.cpp index 821dc88db4..e6a4b4caf2 100644 --- a/Userland/Libraries/LibJS/Runtime/Utf16String.cpp +++ b/Userland/Libraries/LibJS/Runtime/Utf16String.cpp @@ -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) |