1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 22:25:07 +00:00

LibJS: Make NativeProperty a plain Cell instead of an Object

This removes the need for NativeProperty objects to have a prototype,
which just made things confusing.
This commit is contained in:
Andreas Kling 2020-06-23 17:56:57 +02:00
parent ba641e97d9
commit 0166a1fa74
6 changed files with 33 additions and 25 deletions

View file

@ -29,9 +29,8 @@
namespace JS {
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))
NativeProperty::NativeProperty(AK::Function<Value(Interpreter&, GlobalObject&)> getter, AK::Function<void(Interpreter&, GlobalObject&, Value)> setter)
: m_getter(move(getter))
, m_setter(move(setter))
{
}