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

LibJS: Forward receiver value to native property getters/setters

There's no reason why only (user-defined) accessors would have set the
receiver as this value for their getters/setters, this is an oversight.
This commit is contained in:
Linus Groh 2020-11-22 17:29:25 +00:00 committed by Andreas Kling
parent c52739ea4b
commit 48369194d2
4 changed files with 32 additions and 18 deletions

View file

@ -97,7 +97,7 @@ public:
virtual bool put(const PropertyName&, Value, Value receiver = {});
Value get_own_property(const Object& this_object, PropertyName, Value receiver) const;
Value get_own_property(const PropertyName&, Value receiver) const;
Value get_own_properties(const Object& this_object, PropertyKind, bool only_enumerable_properties = false, GetOwnPropertyReturnType = GetOwnPropertyReturnType::StringOnly) const;
virtual Optional<PropertyDescriptor> get_own_property_descriptor(const PropertyName&) const;
Value get_own_property_descriptor_object(const PropertyName&) const;
@ -167,8 +167,8 @@ private:
bool put_own_property(Object& this_object, const StringOrSymbol& property_name, Value, PropertyAttributes attributes, PutOwnPropertyMode = PutOwnPropertyMode::Put, bool throw_exceptions = true);
bool put_own_property_by_index(Object& this_object, u32 property_index, Value, PropertyAttributes attributes, PutOwnPropertyMode = PutOwnPropertyMode::Put, bool throw_exceptions = true);
Value call_native_property_getter(Object* this_object, NativeProperty& property) const;
void call_native_property_setter(Object* this_object, NativeProperty& property, Value) const;
Value call_native_property_getter(NativeProperty& property, Value this_value) const;
void call_native_property_setter(NativeProperty& property, Value this_value, Value) const;
void set_shape(Shape&);