mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Do not get the object property descriptor`s value if it is not present (#45)
Fixes #28 Signed-off-by: Robert Sipka <rsipka.uszeged@partner.samsung.com>
This commit is contained in:
parent
d6e7c471a7
commit
aca603a7eb
1 changed files with 2 additions and 1 deletions
|
|
@ -526,7 +526,8 @@ bool Object::defineOwnProperty(ExecutionState& state, const ObjectPropertyName&
|
|||
// Convert the property named P of object O from a data property to an accessor property.
|
||||
// Preserve the existing values of the converted property’s [[Configurable]] and [[Enumerable]] attributes
|
||||
// and set the rest of the property’s attributes to their default values.
|
||||
newDesc = ObjectPropertyDescriptor(desc.value(), (ObjectPropertyDescriptor::PresentAttribute)f);
|
||||
newDesc = desc.isValuePresent() ? ObjectPropertyDescriptor(desc.value(), (ObjectPropertyDescriptor::PresentAttribute)f)
|
||||
: ObjectPropertyDescriptor((ObjectPropertyDescriptor::PresentAttribute)f);
|
||||
}
|
||||
}
|
||||
// Else, if IsDataDescriptor(current) and IsDataDescriptor(Desc) are both true, then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue