1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 17:44:56 +09:00

LibWeb/Infra: Ignore OOM for utf16 conversion in 'is code unit prefix'

This commit is contained in:
Shannon Booth 2025-05-12 20:04:00 +12:00 committed by Jelle Raaijmakers
parent 91159df0dd
commit 1cd09724f1
Notes: github-actions[bot] 2025-05-12 09:21:47 +00:00

View file

@ -71,8 +71,8 @@ ErrorOr<String> 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).release_value_but_fixme_should_propagate_errors();
auto input_utf16 = utf8_to_utf16(input).release_value_but_fixme_should_propagate_errors();
auto potential_prefix_utf16 = MUST(utf8_to_utf16(potential_prefix));
auto input_utf16 = MUST(utf8_to_utf16(input));
// 1. Let i be 0.
size_t i = 0;