diff options
author | Linus Groh <mail@linusgroh.de> | 2022-08-16 00:20:49 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-08-23 13:58:30 +0100 |
commit | 5dd5896588b0e5a7bc7bdadeaa7dd4865f663b79 (patch) | |
tree | b8c099aac88ad59a9fb06624fd6245f9662a9796 /Userland/Applications/Spreadsheet | |
parent | ecd163bdf1cbf8c9bca9e209a385a41ff5ca4f81 (diff) | |
download | serenity-5dd5896588b0e5a7bc7bdadeaa7dd4865f663b79.zip |
LibJS+LibWeb: Replace GlobalObject with Realm in initialize() functions
This is a continuation of the previous commit.
Calling initialize() is the first thing that's done after allocating a
cell on the JS heap - and in the common case of allocating an object,
that's where properties are assigned and intrinsics occasionally
accessed.
Since those are supposed to live on the realm eventually, this is
another step into that direction.
Diffstat (limited to 'Userland/Applications/Spreadsheet')
-rw-r--r-- | Userland/Applications/Spreadsheet/JSIntegration.cpp | 4 | ||||
-rw-r--r-- | Userland/Applications/Spreadsheet/JSIntegration.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Applications/Spreadsheet/JSIntegration.cpp b/Userland/Applications/Spreadsheet/JSIntegration.cpp index 95b924ec32..1ab581712c 100644 --- a/Userland/Applications/Spreadsheet/JSIntegration.cpp +++ b/Userland/Applications/Spreadsheet/JSIntegration.cpp @@ -371,9 +371,9 @@ WorkbookObject::WorkbookObject(JS::Realm& realm, Workbook& workbook) { } -void WorkbookObject::initialize(JS::GlobalObject& global_object) +void WorkbookObject::initialize(JS::Realm& realm) { - Object::initialize(global_object); + Object::initialize(realm); define_native_function("sheet", sheet, 1, JS::default_attributes); } diff --git a/Userland/Applications/Spreadsheet/JSIntegration.h b/Userland/Applications/Spreadsheet/JSIntegration.h index 78433d0f5b..ecd1d32d5e 100644 --- a/Userland/Applications/Spreadsheet/JSIntegration.h +++ b/Userland/Applications/Spreadsheet/JSIntegration.h @@ -54,7 +54,7 @@ public: virtual ~WorkbookObject() override = default; - virtual void initialize(JS::GlobalObject&) override; + virtual void initialize(JS::Realm&) override; JS_DECLARE_NATIVE_FUNCTION(sheet); |