summaryrefslogtreecommitdiff
path: root/Userland/Applications/Spreadsheet/Spreadsheet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Applications/Spreadsheet/Spreadsheet.cpp')
-rw-r--r--Userland/Applications/Spreadsheet/Spreadsheet.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Applications/Spreadsheet/Spreadsheet.cpp b/Userland/Applications/Spreadsheet/Spreadsheet.cpp
index 2d8aa751c5..079104ddf3 100644
--- a/Userland/Applications/Spreadsheet/Spreadsheet.cpp
+++ b/Userland/Applications/Spreadsheet/Spreadsheet.cpp
@@ -163,6 +163,9 @@ Sheet::ValueAndException Sheet::evaluate(const StringView& source, Cell* on_beha
if (parser.has_errors() || interpreter().exception())
return { JS::js_undefined(), interpreter().exception() };
+ // FIXME: This creates a GlobalEnvironment for every evaluate call which we might be able to circumvent with multiple realms.
+ interpreter().realm().set_global_object(global_object(), &global_object());
+
interpreter().run(global_object(), program);
if (interpreter().exception()) {
auto exc = interpreter().exception();