mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +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:
@@ -29,8 +29,8 @@
|
||||
|
||||
namespace JS {
|
||||
|
||||
NativeProperty::NativeProperty(AK::Function<Value(Interpreter&, GlobalObject&)> getter, AK::Function<void(Interpreter&, GlobalObject&, Value)> setter)
|
||||
: Object(nullptr)
|
||||
NativeProperty::NativeProperty(GlobalObject& global_object, AK::Function<Value(Interpreter&, GlobalObject&)> getter, AK::Function<void(Interpreter&, GlobalObject&, Value)> setter)
|
||||
: Object(Object::ConstructWithoutPrototypeTag::Tag, global_object)
|
||||
, m_getter(move(getter))
|
||||
, m_setter(move(setter))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user