1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

LibJS: Use correct |this| value when getting/setting native properties

This commit is contained in:
Andreas Kling 2020-03-24 14:46:05 +01:00
parent 8705c5ffeb
commit 7dc78b5e38
4 changed files with 15 additions and 15 deletions

View file

@ -43,8 +43,8 @@ public:
Value get(const FlyString& property_name) const;
void put(const FlyString& property_name, Value);
virtual Optional<Value> get_own_property(const FlyString& property_name) const;
virtual bool put_own_property(const FlyString& property_name, Value);
virtual Optional<Value> get_own_property(const Object& this_object, const FlyString& property_name) const;
virtual bool put_own_property(Object& this_object, const FlyString& property_name, Value);
void put_native_function(const FlyString& property_name, AK::Function<Value(Object*, Vector<Value>)>);
void put_native_property(const FlyString& property_name, AK::Function<Value(Object*)> getter, AK::Function<void(Object*, Value)> setter);