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

LibJS: Make Object.prototype.constructor non-enumerable

This commit is contained in:
Linus Groh 2020-05-16 17:59:57 +01:00 committed by Andreas Kling
parent 9f064d4439
commit b299c75d45
2 changed files with 24 additions and 18 deletions

View file

@ -73,7 +73,7 @@ inline void GlobalObject::add_constructor(const FlyString& property_name, Constr
{
constructor = heap().allocate<ConstructorType>();
constructor->put("name", js_string(heap(), property_name), Attribute::Configurable);
prototype.put("constructor", constructor);
prototype.put("constructor", constructor, Attribute::Writable | Attribute::Configurable);
put(property_name, constructor, Attribute::Writable | Attribute::Configurable);
}