1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:37:44 +00:00

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. :^)
This commit is contained in:
Andreas Kling 2022-08-28 23:51:28 +02:00
parent d54ba587f3
commit 35c9aa7c05
196 changed files with 456 additions and 242 deletions

View file

@ -17,7 +17,6 @@ class WrappedFunction final : public FunctionObject {
public:
static ThrowCompletionOr<WrappedFunction*> create(Realm&, Realm& caller_realm, FunctionObject& target_function);
WrappedFunction(Realm&, FunctionObject&, Object& prototype);
virtual ~WrappedFunction() = default;
virtual ThrowCompletionOr<Value> internal_call(Value this_argument, MarkedVector<Value> arguments_list) override;
@ -31,6 +30,8 @@ public:
FunctionObject& wrapped_target_function() { return m_wrapped_target_function; }
private:
WrappedFunction(Realm&, FunctionObject&, Object& prototype);
virtual void visit_edges(Visitor&) override;
// Internal Slots of Wrapped Function Exotic Objects, https://tc39.es/proposal-shadowrealm/#table-internal-slots-of-wrapped-function-exotic-objects