mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:57:35 +00:00
LibUnicode+LibJS: Stop propagating small OOM errors from normalization
This API only perform small allocations, and is only used by LibJS.
This commit is contained in:
parent
331991f9c4
commit
02a8683266
4 changed files with 65 additions and 69 deletions
|
@ -666,7 +666,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::normalize)
|
|||
|
||||
// 6. Let ns be the String value that is the result of normalizing S into the normalization form named by f as specified in https://unicode.org/reports/tr15/.
|
||||
auto unicode_form = Unicode::normalization_form_from_string(form);
|
||||
auto ns = TRY_OR_THROW_OOM(vm, Unicode::normalize(string, unicode_form));
|
||||
auto ns = Unicode::normalize(string, unicode_form);
|
||||
|
||||
// 7. Return ns.
|
||||
return PrimitiveString::create(vm, move(ns));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue