summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-08-28 14:42:50 +0100
committerLinus Groh <mail@linusgroh.de>2022-08-28 16:36:56 +0100
commitcfa588585512540be5738b9b02511560a1126612 (patch)
tree059013bc0b3bb81c4d7bc792f326fc3402ffac51 /Userland/Applications
parent867ad039959e92b05b728f7a45d6793c34aa853f (diff)
downloadserenity-cfa588585512540be5738b9b02511560a1126612.zip
LibJS: Turn initialize_global_object() into a regular initialize()
There's nothing special about global object initialization anymore, this can just work the same way as for any other object now.
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/Spreadsheet/JSIntegration.cpp5
-rw-r--r--Userland/Applications/Spreadsheet/JSIntegration.h3
2 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Applications/Spreadsheet/JSIntegration.cpp b/Userland/Applications/Spreadsheet/JSIntegration.cpp
index f5e2022fa0..b7e5a07f83 100644
--- a/Userland/Applications/Spreadsheet/JSIntegration.cpp
+++ b/Userland/Applications/Spreadsheet/JSIntegration.cpp
@@ -144,9 +144,10 @@ JS::ThrowCompletionOr<bool> SheetGlobalObject::internal_set(const JS::PropertyKe
return Base::internal_set(property_name, value, receiver);
}
-void SheetGlobalObject::initialize_global_object(JS::Realm& realm)
+void SheetGlobalObject::initialize(JS::Realm& realm)
{
- Base::initialize_global_object(realm);
+ Base::initialize(realm);
+
u8 attr = JS::Attribute::Configurable | JS::Attribute::Writable | JS::Attribute::Enumerable;
define_native_function(realm, "get_real_cell_contents", get_real_cell_contents, 1, attr);
define_native_function(realm, "set_real_cell_contents", set_real_cell_contents, 2, attr);
diff --git a/Userland/Applications/Spreadsheet/JSIntegration.h b/Userland/Applications/Spreadsheet/JSIntegration.h
index bf6f007e5e..1d76430ab7 100644
--- a/Userland/Applications/Spreadsheet/JSIntegration.h
+++ b/Userland/Applications/Spreadsheet/JSIntegration.h
@@ -24,13 +24,12 @@ class SheetGlobalObject final : public JS::GlobalObject {
public:
SheetGlobalObject(JS::Realm&, Sheet&);
-
+ virtual void initialize(JS::Realm&) override;
virtual ~SheetGlobalObject() override = default;
virtual JS::ThrowCompletionOr<bool> internal_has_property(JS::PropertyKey const& name) const override;
virtual JS::ThrowCompletionOr<JS::Value> internal_get(JS::PropertyKey const&, JS::Value receiver) const override;
virtual JS::ThrowCompletionOr<bool> internal_set(JS::PropertyKey const&, JS::Value value, JS::Value receiver) override;
- virtual void initialize_global_object(JS::Realm&) override;
JS_DECLARE_NATIVE_FUNCTION(get_real_cell_contents);
JS_DECLARE_NATIVE_FUNCTION(set_real_cell_contents);