mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +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
|
@ -34,8 +34,8 @@ DeprecatedString strip_and_collapse_whitespace(StringView string)
|
|||
// https://infra.spec.whatwg.org/#code-unit-prefix
|
||||
bool is_code_unit_prefix(StringView potential_prefix, StringView input)
|
||||
{
|
||||
auto potential_prefix_utf16 = utf8_to_utf16(potential_prefix);
|
||||
auto input_utf16 = utf8_to_utf16(input);
|
||||
auto potential_prefix_utf16 = utf8_to_utf16(potential_prefix).release_value_but_fixme_should_propagate_errors();
|
||||
auto input_utf16 = utf8_to_utf16(input).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
// 1. Let i be 0.
|
||||
size_t i = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue