mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
js: Remove DeprecatedString usage in load_json_impl()
This commit is contained in:
parent
ff5a8a21e8
commit
cb3216cb45
Notes:
sideshowbarker
2024-07-17 03:03:44 +09:00
Author: https://github.com/evansmal Commit: https://github.com/SerenityOS/serenity/commit/cb3216cb45 Pull-request: https://github.com/SerenityOS/serenity/pull/17306 Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/linusg
1 changed files with 1 additions and 1 deletions
|
@ -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()));
|
||||
|
|
Loading…
Reference in a new issue