Skip to content
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

Remove unnecessary assertion in the ArrayObject's setArrayLength function #34

Merged
merged 1 commit into from
Jan 4, 2019

Conversation

DanielBallaSZTE
Copy link
Contributor

@DanielBallaSZTE DanielBallaSZTE commented Jan 2, 2019

Fixes #33

There's no need to put an assertion there because:

  • The ArrayObject's length can be changed even when it's not extensible, it just fills the Array with empty values.
  • Modifying the length of an ArrayObject should not throw an error, the only time it should do is when an element is pushed to a non-extensible ArrayObject.

Signed-off-by: Daniel Balla [email protected]

@DanielBallaSZTE DanielBallaSZTE force-pushed the fix_nonextensible_array branch from 16c8269 to aa85a78 Compare January 2, 2019 14:57
…tion

There's no need to put an assertion there because:
 - The ArrayObject's length can be changed even when it's not extensible, it just fills the Array with empty values.
 - Modifying the length of an ArrayObject should not throw an error, the only time it should when an element is pushed to a non-extensible ArrayObject.

Fixes Samsung#33

Signed-off-by: Daniel Balla [email protected]
@DanielBallaSZTE DanielBallaSZTE force-pushed the fix_nonextensible_array branch from aa85a78 to 8be5c70 Compare January 2, 2019 14:59
@DanielBallaSZTE DanielBallaSZTE changed the title Fix not checking if an Array is not extensible in the native setter function @DanielBallaSZTE Remove unnecessary assertion in the ArrayObject's setArrayLength function Jan 2, 2019
@DanielBallaSZTE DanielBallaSZTE changed the title @DanielBallaSZTE Remove unnecessary assertion in the ArrayObject's setArrayLength function Remove unnecessary assertion in the ArrayObject's setArrayLength function Jan 2, 2019
Copy link
Contributor

@akosthekiss akosthekiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@clover2123 clover2123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yichoi yichoi merged commit 51f10cb into Samsung:master Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants