1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:17:35 +00:00

LibJS: Remove js_string(Interpreter&, ...)

This commit is contained in:
Andreas Kling 2020-09-27 20:03:42 +02:00
parent adf0a537af
commit 591b7b7031
8 changed files with 9 additions and 16 deletions

View file

@ -157,7 +157,7 @@ JS::Value Cell::js_data()
if (kind == Formula)
return evaluated_data;
return JS::js_string(sheet->interpreter(), data);
return JS::js_string(sheet->interpreter().heap(), data);
}
String Cell::source() const

View file

@ -51,7 +51,7 @@ String StringCell::display(Cell& cell, const CellTypeMetadata& metadata) const
JS::Value StringCell::js_value(Cell& cell, const CellTypeMetadata& metadata) const
{
auto string = display(cell, metadata);
return JS::js_string(cell.sheet->interpreter(), string);
return JS::js_string(cell.sheet->interpreter().heap(), string);
}
}

View file

@ -248,7 +248,7 @@ RefPtr<Sheet> Sheet::from_json(const JsonObject& object, Workbook& workbook)
break;
case Cell::Formula: {
auto& interpreter = sheet->interpreter();
auto value = interpreter.call(parse_function, json, JS::js_string(interpreter, obj.get("value").as_string()));
auto value = interpreter.call(parse_function, json, JS::js_string(interpreter.heap(), obj.get("value").as_string()));
cell = make<Cell>(obj.get("source").to_string(), move(value), sheet->make_weak_ptr());
break;
}