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
commit ba641e97d9
Notes: sideshowbarker 2024-07-19 05:25:37 +09:00
33 changed files with 57 additions and 45 deletions

View file

@ -40,7 +40,7 @@ Array* Array::create(GlobalObject& global_object)
}
Array::Array(Object& prototype)
: Object(&prototype)
: Object(prototype)
{
define_native_property("length", length_getter, length_setter, Attribute::Writable);
}