diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-28 23:51:28 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-29 03:24:54 +0200 |
commit | 35c9aa7c05c7d2b012e86cc72945ade3440ab0bf (patch) | |
tree | 3ffb3539258c90fadd70f77fb0f189bd2be03165 /Userland/Libraries/LibJS/Contrib | |
parent | d54ba587f3d4c33b7bbe1a6c7bdc5da124a566c5 (diff) | |
download | serenity-35c9aa7c05c7d2b012e86cc72945ade3440ab0bf.zip |
LibJS: Hide all the constructors!
Now that the GC allocator is able to invoke Cell subclass constructors
directly via friendship, we no longer need to keep them public. :^)
Diffstat (limited to 'Userland/Libraries/LibJS/Contrib')
4 files changed, 11 insertions, 7 deletions
diff --git a/Userland/Libraries/LibJS/Contrib/Test262/$262Object.h b/Userland/Libraries/LibJS/Contrib/Test262/$262Object.h index aa586f58dc..ac4a21d947 100644 --- a/Userland/Libraries/LibJS/Contrib/Test262/$262Object.h +++ b/Userland/Libraries/LibJS/Contrib/Test262/$262Object.h @@ -17,11 +17,12 @@ class $262Object final : public Object { JS_OBJECT($262Object, Object); public: - explicit $262Object(Realm&); virtual void initialize(JS::Realm&) override; virtual ~$262Object() override = default; private: + explicit $262Object(Realm&); + virtual void visit_edges(Visitor&) override; AgentObject* m_agent { nullptr }; diff --git a/Userland/Libraries/LibJS/Contrib/Test262/AgentObject.h b/Userland/Libraries/LibJS/Contrib/Test262/AgentObject.h index 262d939994..3daf6e166d 100644 --- a/Userland/Libraries/LibJS/Contrib/Test262/AgentObject.h +++ b/Userland/Libraries/LibJS/Contrib/Test262/AgentObject.h @@ -15,11 +15,12 @@ class AgentObject final : public Object { JS_OBJECT(AgentObject, Object); public: - explicit AgentObject(Realm&); virtual void initialize(JS::Realm&) override; virtual ~AgentObject() override = default; private: + explicit AgentObject(Realm&); + JS_DECLARE_NATIVE_FUNCTION(monotonic_now); JS_DECLARE_NATIVE_FUNCTION(sleep); }; diff --git a/Userland/Libraries/LibJS/Contrib/Test262/GlobalObject.h b/Userland/Libraries/LibJS/Contrib/Test262/GlobalObject.h index f095233c1a..84cbdb5889 100644 --- a/Userland/Libraries/LibJS/Contrib/Test262/GlobalObject.h +++ b/Userland/Libraries/LibJS/Contrib/Test262/GlobalObject.h @@ -15,16 +15,17 @@ class GlobalObject final : public JS::GlobalObject { JS_OBJECT(GlobalObject, JS::GlobalObject); public: - GlobalObject(JS::Realm& realm) - : JS::GlobalObject(realm) - { - } virtual void initialize(Realm&) override; virtual ~GlobalObject() override = default; $262Object* $262() const { return m_$262; } private: + GlobalObject(JS::Realm& realm) + : JS::GlobalObject(realm) + { + } + virtual void visit_edges(Visitor&) override; $262Object* m_$262 { nullptr }; diff --git a/Userland/Libraries/LibJS/Contrib/Test262/IsHTMLDDA.h b/Userland/Libraries/LibJS/Contrib/Test262/IsHTMLDDA.h index f34322e4ea..f8b1788b0a 100644 --- a/Userland/Libraries/LibJS/Contrib/Test262/IsHTMLDDA.h +++ b/Userland/Libraries/LibJS/Contrib/Test262/IsHTMLDDA.h @@ -14,12 +14,13 @@ class IsHTMLDDA final : public NativeFunction { JS_OBJECT(IsHTMLDDA, NativeFunction); public: - explicit IsHTMLDDA(Realm&); virtual ~IsHTMLDDA() override = default; virtual ThrowCompletionOr<Value> call() override; private: + explicit IsHTMLDDA(Realm&); + virtual bool is_htmldda() const override { return true; } }; |