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

LibJS: Integrate Symbols into objects as valid keys

This allows objects properties to be created for symbol keys in addition
to just plain strings/numbers
This commit is contained in:
Matthew Olsson 2020-07-07 21:38:46 -07:00 committed by Andreas Kling
parent 9783a4936c
commit 7a1d485b19
14 changed files with 424 additions and 154 deletions

View file

@ -52,12 +52,12 @@ public:
virtual bool set_prototype(Object* object) override;
virtual bool is_extensible() const override;
virtual bool prevent_extensions() override;
virtual Optional<PropertyDescriptor> get_own_property_descriptor(PropertyName) const override;
virtual bool define_property(const FlyString& property_name, const Object& descriptor, bool throw_exceptions = true) override;
virtual bool has_property(PropertyName name) const override;
virtual Value get(PropertyName name, Value receiver) const override;
virtual bool put(PropertyName name, Value value, Value receiver) override;
virtual Value delete_property(PropertyName name) override;
virtual Optional<PropertyDescriptor> get_own_property_descriptor(const PropertyName&) const override;
virtual bool define_property(const StringOrSymbol& property_name, const Object& descriptor, bool throw_exceptions = true) override;
virtual bool has_property(const PropertyName& name) const override;
virtual Value get(const PropertyName& name, Value receiver) const override;
virtual bool put(const PropertyName& name, Value value, Value receiver) override;
virtual Value delete_property(const PropertyName& name) override;
void revoke() { m_is_revoked = true; }