summaryrefslogtreecommitdiff
path: root/Userland/Applications/Spreadsheet
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-08-01 20:27:20 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-05 12:42:46 +0200
commit50d951aea24af43256e138d60fe0c48770570919 (patch)
tree24190fc4a4003a6d7d87d282afaea7de58cc6a02 /Userland/Applications/Spreadsheet
parent7a6935a2ff85178e1059ca07132a1fff9e55eab2 (diff)
downloadserenity-50d951aea24af43256e138d60fe0c48770570919.zip
LibJS: Let Shape store a Realm instead of a GlobalObject
This is a cautious first step towards being able to create JS objects before a global object has been instantiated.
Diffstat (limited to 'Userland/Applications/Spreadsheet')
-rw-r--r--Userland/Applications/Spreadsheet/JSIntegration.cpp5
-rw-r--r--Userland/Applications/Spreadsheet/JSIntegration.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/Userland/Applications/Spreadsheet/JSIntegration.cpp b/Userland/Applications/Spreadsheet/JSIntegration.cpp
index febae065de..2512f8b324 100644
--- a/Userland/Applications/Spreadsheet/JSIntegration.cpp
+++ b/Userland/Applications/Spreadsheet/JSIntegration.cpp
@@ -92,8 +92,9 @@ Optional<FunctionAndArgumentIndex> get_function_and_argument_index(StringView so
return {};
}
-SheetGlobalObject::SheetGlobalObject(Sheet& sheet)
- : m_sheet(sheet)
+SheetGlobalObject::SheetGlobalObject(JS::Realm& realm, Sheet& sheet)
+ : JS::GlobalObject(realm)
+ , m_sheet(sheet)
{
}
diff --git a/Userland/Applications/Spreadsheet/JSIntegration.h b/Userland/Applications/Spreadsheet/JSIntegration.h
index 15c237634d..f879c99880 100644
--- a/Userland/Applications/Spreadsheet/JSIntegration.h
+++ b/Userland/Applications/Spreadsheet/JSIntegration.h
@@ -23,7 +23,7 @@ class SheetGlobalObject final : public JS::GlobalObject {
JS_OBJECT(SheetGlobalObject, JS::GlobalObject);
public:
- SheetGlobalObject(Sheet&);
+ SheetGlobalObject(JS::Realm&, Sheet&);
virtual ~SheetGlobalObject() override = default;