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:
parent
9f064d4439
commit
b299c75d45
2 changed files with 24 additions and 18 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue