1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:37:34 +00:00

LibJS+LibWeb: Convert empty PrimitiveString invocators to String

This commit is contained in:
Timothy Flynn 2023-01-21 10:42:46 -05:00 committed by Linus Groh
parent 1bcde5d216
commit 34574c5ee8
9 changed files with 13 additions and 13 deletions

View file

@ -83,7 +83,7 @@ ThrowCompletionOr<void> copy_name_and_length(VM& vm, FunctionObject& function, F
// 7. If Type(targetName) is not String, set targetName to the empty String.
if (!target_name.is_string())
target_name = PrimitiveString::create(vm, DeprecatedString::empty());
target_name = PrimitiveString::create(vm, String {});
// 8. Perform SetFunctionName(F, targetName, prefix).
function.set_function_name({ TRY(target_name.as_string().deprecated_string()) }, move(prefix));