mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-22 18:22:07 +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
Notes:
sideshowbarker
2024-07-17 03:25:24 +09:00
Author: https://github.com/awesomekling
Commit: e0b2757f95
Pull-request: https://github.com/SerenityOS/serenity/pull/19916
3 changed files with 5 additions and 1 deletions
|
@ -936,7 +936,7 @@ Bytecode::CodeGenerationErrorOr<void> ObjectExpression::generate_bytecode(Byteco
|
|||
Bytecode::Op::PropertyKind property_kind;
|
||||
switch (property->type()) {
|
||||
case ObjectProperty::Type::KeyValue:
|
||||
property_kind = Bytecode::Op::PropertyKind::KeyValue;
|
||||
property_kind = Bytecode::Op::PropertyKind::DirectKeyValue;
|
||||
break;
|
||||
case ObjectProperty::Type::Getter:
|
||||
property_kind = Bytecode::Op::PropertyKind::Getter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue