mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
LibJS/Bytecode: Always make own properties in object expressions
When building an object from an object expression, we don't want to go through the full property setting machinery. This patch adds a new PropertyKind::DirectKeyValue for PutById which guarantees that the property becomes an own property. This fixes an issue where setting the "__proto__" property in object expressions wasn't working right. 12 new passes on test262. :^)
This commit is contained in:
parent
91528e94ac
commit
e0b2757f95
3 changed files with 5 additions and 1 deletions
|
@ -644,6 +644,7 @@ enum class PropertyKind {
|
|||
Getter,
|
||||
Setter,
|
||||
KeyValue,
|
||||
DirectKeyValue, // Used for Object expressions. Always sets an own property, never calls a setter.
|
||||
Spread,
|
||||
ProtoSetter,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue