1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:27:46 +00:00

LibJS: Make ObjectPrototype an immutable prototype exotic object

To make this happen, this patch implements the SetImmutablePrototype
abstract operation (as a method on Object) and then overrides
[[SetPrototypeOf]] on ObjectPrototype.
This commit is contained in:
Linus Groh 2021-07-04 23:48:47 +01:00
parent fac8f9a94d
commit cb20baebae
5 changed files with 41 additions and 0 deletions

View file

@ -100,6 +100,10 @@ public:
virtual bool internal_delete(PropertyName const&);
virtual MarkedValueList internal_own_property_keys() const;
// 10.4.7 Immutable Prototype Exotic Objects, https://tc39.es/ecma262/#sec-immutable-prototype-exotic-objects
bool set_immutable_prototype(Object* prototype);
// 20.1 Object Objects, https://tc39.es/ecma262/#sec-object-objects
Object* define_properties(Value properties);