js: Remove DeprecatedString usage in load_json_impl()

This commit is contained in:
Evan Smal 2023-02-04 09:17:06 -05:00 committed by Linus Groh
parent ff5a8a21e8
commit cb3216cb45

View file

@ -352,7 +352,7 @@ static JS::ThrowCompletionOr<JS::Value> load_ini_impl(JS::VM& vm)
static JS::ThrowCompletionOr<JS::Value> load_json_impl(JS::VM& vm)
{
auto filename = TRY(vm.argument(0).to_deprecated_string(vm));
auto filename = TRY(vm.argument(0).to_string(vm));
auto file_or_error = Core::Stream::File::open(filename, Core::Stream::OpenMode::Read);
if (file_or_error.is_error())
return vm.throw_completion<JS::Error>(DeprecatedString::formatted("Failed to open '{}': {}", filename, file_or_error.error()));