1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:47:35 +00:00

LibJS: Make Value::as_string() return a PrimitiveString reference

This commit is contained in:
Andreas Kling 2020-04-29 12:35:39 +02:00
parent 75f246dde8
commit 698652a548
5 changed files with 15 additions and 15 deletions

View file

@ -322,7 +322,7 @@ JS::Value ReplObject::load_file(JS::Interpreter& interpreter)
return JS::Value(false);
for (auto& file : interpreter.call_frame().arguments) {
String file_name = file.as_string()->string();
String file_name = file.as_string().string();
auto js_file = Core::File::construct(file_name);
if (!js_file->open(Core::IODevice::ReadOnly)) {
fprintf(stderr, "Failed to open %s: %s\n", file_name.characters(), js_file->error_string());