AK+LibJS+LibWeb: Use simdutf to create well-formed strings

This commit is contained in:
Timothy Flynn 2025-07-25 15:37:06 -04:00 committed by Jelle Raaijmakers
commit 1375e6bf39
Notes: github-actions[bot] 2025-07-25 22:41:55 +00:00
9 changed files with 37 additions and 42 deletions

View file

@ -241,7 +241,7 @@ JS::ThrowCompletionOr<Utf16String> to_utf16_string(JS::VM& vm, JS::Value value)
JS::ThrowCompletionOr<String> to_usv_string(JS::VM& vm, JS::Value value)
{
return value.to_well_formed_string(vm);
return TRY(value.to_utf16_string(vm)).to_well_formed_utf8();
}
// https://webidl.spec.whatwg.org/#invoke-a-callback-function