LibJS: Make PrimitiveString::deprecated_string() infallible

Work towards #20449.
This commit is contained in:
Andreas Kling 2023-08-08 19:30:07 +02:00
commit 09547ec975
Notes: sideshowbarker 2024-07-16 20:08:14 +09:00
17 changed files with 42 additions and 43 deletions

View file

@ -87,7 +87,7 @@ ThrowCompletionOr<void> copy_name_and_length(VM& vm, FunctionObject& function, F
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));
function.set_function_name({ target_name.as_string().deprecated_string() }, move(prefix));
return {};
}