summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
authormjz19910 <matthias291999@gmail.com>2022-01-23 02:12:26 -0700
committerLinus Groh <mail@linusgroh.de>2022-01-23 15:24:45 +0000
commit1ef633472b730ac173a9108226f8ebd7a73dbacf (patch)
tree90f60e5eb1fe8e4eb70b0a906bdd697bf508d32b /Userland/Applications
parentd436746c952fa904e53413279134266ce965a30e (diff)
downloadserenity-1ef633472b730ac173a9108226f8ebd7a73dbacf.zip
Everywhere: Convert VM::call() to JS::call()
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/Spreadsheet/Spreadsheet.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Applications/Spreadsheet/Spreadsheet.cpp b/Userland/Applications/Spreadsheet/Spreadsheet.cpp
index a514921805..cc0a3721b8 100644
--- a/Userland/Applications/Spreadsheet/Spreadsheet.cpp
+++ b/Userland/Applications/Spreadsheet/Spreadsheet.cpp
@@ -19,6 +19,7 @@
#include <LibCore/File.h>
#include <LibJS/Interpreter.h>
#include <LibJS/Parser.h>
+#include <LibJS/Runtime/AbstractOperations.h>
#include <LibJS/Runtime/FunctionObject.h>
#include <ctype.h>
#include <unistd.h>
@@ -400,7 +401,7 @@ RefPtr<Sheet> Sheet::from_json(const JsonObject& object, Workbook& workbook)
break;
case Cell::Formula: {
auto& interpreter = sheet->interpreter();
- auto value_or_error = interpreter.vm().call(parse_function, json, JS::js_string(interpreter.heap(), obj.get("value").as_string()));
+ auto value_or_error = JS::call(interpreter.global_object(), parse_function, json, JS::js_string(interpreter.heap(), obj.get("value").as_string()));
VERIFY(!value_or_error.is_error());
cell = make<Cell>(obj.get("source").to_string(), value_or_error.release_value(), position, *sheet);
break;
@@ -530,7 +531,7 @@ JsonObject Sheet::to_json() const
if (it.value->kind() == Cell::Formula) {
data.set("source", it.value->data());
auto json = interpreter().global_object().get_without_side_effects("JSON");
- auto stringified_or_error = interpreter().vm().call(json.as_object().get_without_side_effects("stringify").as_function(), json, it.value->evaluated_data());
+ auto stringified_or_error = JS::call(interpreter().global_object(), json.as_object().get_without_side_effects("stringify").as_function(), json, it.value->evaluated_data());
VERIFY(!stringified_or_error.is_error());
data.set("value", stringified_or_error.release_value().to_string_without_side_effects());
} else {