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

LibJS: Clarify Object (base class) construction somewhat

Divide the Object constructor into three variants:

- The regular one (takes an Object& prototype)
- One for use by GlobalObject
- One for use by objects without a prototype (e.g ObjectPrototype)
This commit is contained in:
Andreas Kling 2020-06-23 17:21:53 +02:00
parent fc4ed8d444
commit ba641e97d9
33 changed files with 57 additions and 45 deletions

View file

@ -35,7 +35,7 @@ class NativeProperty final : public Object {
JS_OBJECT(NativeProperty, Object);
public:
NativeProperty(AK::Function<Value(Interpreter&, GlobalObject&)> getter, AK::Function<void(Interpreter&, GlobalObject&, Value)> setter);
NativeProperty(GlobalObject&, AK::Function<Value(Interpreter&, GlobalObject&)> getter, AK::Function<void(Interpreter&, GlobalObject&, Value)> setter);
virtual ~NativeProperty() override;
Value get(Interpreter&, GlobalObject&) const;