mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +00:00
Everywhere: Convert known short-strings to the infallible String factory
For now, this is limited to strings that are 3 bytes or less. We can use 7 bytes on 64-bit platforms, but we do not yet assume 64-bit for Lagom hosts (e.g. wasm).
This commit is contained in:
parent
d48266a420
commit
f1de4f8872
7 changed files with 7 additions and 7 deletions
|
@ -489,7 +489,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::normalize)
|
|||
|
||||
// 3. If form is undefined, let f be "NFC".
|
||||
if (auto form_value = vm.argument(0); form_value.is_undefined()) {
|
||||
form = TRY_OR_THROW_OOM(vm, String::from_utf8("NFC"sv));
|
||||
form = String::from_utf8_short_string("NFC"sv);
|
||||
}
|
||||
// 4. Else, let f be ? ToString(form).
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue