Skip to content

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

Merged
merged 1 commit into from
Jun 22, 2015
Merged

Implement Object.seal and Object.isSealed function #172

merged 1 commit into from
Jun 22, 2015

Conversation

kkristof
Copy link
Contributor

JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com


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;
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@egavrin egavrin added ecma builtins Related to ECMA built-in routines development Feature implementation labels Jun 12, 2015
@egavrin egavrin added this to the ECMA builtins milestone Jun 12, 2015
@kkristof
Copy link
Contributor Author

Hi, I have updated the branch.

property_p->u.named_data_property.name_p);
}
else
if (property_p->type == ECMA_PROPERTY_NAMEDACCESSOR)
Copy link
Contributor

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.

@galpeter
Copy link
Contributor

lgtm, but it seems this needs a rebase

@kkristof
Copy link
Contributor Author

Hi, I have rebased for the current master.

continue;
}

// 2.b
Copy link
Contributor

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?

@kkristof
Copy link
Contributor Author

Hi, I have updated and rebased the patch.

@ruben-ayrapetyan
Copy link
Contributor

Looks good to me.

@galpeter
Copy link
Contributor

lgtm

@egavrin
Copy link
Contributor

egavrin commented Jun 21, 2015

make push

@egavrin egavrin assigned kkristof and unassigned egavrin Jun 21, 2015
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
@kkristof kkristof merged commit 2ee469e into jerryscript-project:master Jun 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Feature implementation ecma builtins Related to ECMA built-in routines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants