diff options
author | Linus Groh <mail@linusgroh.de> | 2022-08-28 14:42:50 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-08-28 16:36:56 +0100 |
commit | cfa588585512540be5738b9b02511560a1126612 (patch) | |
tree | 059013bc0b3bb81c4d7bc792f326fc3402ffac51 /Userland/Libraries/LibJS/Contrib/Test262 | |
parent | 867ad039959e92b05b728f7a45d6793c34aa853f (diff) | |
download | serenity-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/Libraries/LibJS/Contrib/Test262')
3 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibJS/Contrib/Test262/$262Object.cpp b/Userland/Libraries/LibJS/Contrib/Test262/$262Object.cpp index b70b70abf9..bca046a5cc 100644 --- a/Userland/Libraries/LibJS/Contrib/Test262/$262Object.cpp +++ b/Userland/Libraries/LibJS/Contrib/Test262/$262Object.cpp @@ -62,7 +62,7 @@ JS_DEFINE_NATIVE_FUNCTION($262Object::create_realm) auto* realm_global_object = vm.heap().allocate_without_realm<GlobalObject>(*realm); VERIFY(realm_global_object); realm->set_global_object(realm_global_object, nullptr); - realm_global_object->initialize_global_object(*realm); + realm_global_object->initialize(*realm); return Value(realm_global_object->$262()); } diff --git a/Userland/Libraries/LibJS/Contrib/Test262/GlobalObject.cpp b/Userland/Libraries/LibJS/Contrib/Test262/GlobalObject.cpp index 2129fcfa04..95d7c3867b 100644 --- a/Userland/Libraries/LibJS/Contrib/Test262/GlobalObject.cpp +++ b/Userland/Libraries/LibJS/Contrib/Test262/GlobalObject.cpp @@ -14,9 +14,9 @@ namespace JS::Test262 { -void GlobalObject::initialize_global_object(Realm& realm) +void GlobalObject::initialize(Realm& realm) { - Base::initialize_global_object(realm); + Base::initialize(realm); m_$262 = vm().heap().allocate<$262Object>(realm, realm); diff --git a/Userland/Libraries/LibJS/Contrib/Test262/GlobalObject.h b/Userland/Libraries/LibJS/Contrib/Test262/GlobalObject.h index 168467d0b6..f095233c1a 100644 --- a/Userland/Libraries/LibJS/Contrib/Test262/GlobalObject.h +++ b/Userland/Libraries/LibJS/Contrib/Test262/GlobalObject.h @@ -19,7 +19,7 @@ public: : JS::GlobalObject(realm) { } - virtual void initialize_global_object(Realm&) override; + virtual void initialize(Realm&) override; virtual ~GlobalObject() override = default; $262Object* $262() const { return m_$262; } |