-
Notifications
You must be signed in to change notification settings - Fork 682
Implement Object.seal and Object.isSealed function #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
if (prop_p->type == ECMA_PROPERTY_NAMEDDATA) | ||
{ | ||
prop_desc.value = ecma_get_named_data_property_value (prop_p); | ||
prop_desc.is_value_defined = true; | ||
prop_desc.is_value_defined = ecma_is_value_empty (prop_desc.value) ? true : false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this value be empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this was supposed to fix an assertion but I definitely swapped the logical value so this is just an ugly and wrong hack.
Hi, I have updated the branch. |
property_p->u.named_data_property.name_p); | ||
} | ||
else | ||
if (property_p->type == ECMA_PROPERTY_NAMEDACCESSOR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else if
should be on one line.
lgtm, but it seems this needs a rebase |
Hi, I have rebased for the current master. |
continue; | ||
} | ||
|
||
// 2.b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you, please, add an assertion that the property's type is one of named property types?
Hi, I have updated and rebased the patch. |
Looks good to me. |
lgtm |
|
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com