Skip to content

Conversation

@dbatyai
Copy link
Member

@dbatyai dbatyai commented Jul 17, 2015

The leak occurs when fromIndex can't coerce to primitive value.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com

@dbatyai dbatyai added bug Undesired behaviour ecma builtins Related to ECMA built-in routines labels Jul 17, 2015
@dbatyai dbatyai added this to the ECMA builtins milestone Jul 17, 2015
@dbatyai dbatyai force-pushed the array_indexof_leak branch from b632674 to 3d3f467 Compare July 17, 2015 09:10

Choose a reason for hiding this comment

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

The lines could be moved to if block at line 991, and here we can define variable of ecma_number_t, not pointer.
In the case, call to ecma_dealloc_number at line 995 could be removed.

@ruben-ayrapetyan
Copy link

Looks good to me

@zherczeg
Copy link
Member

+1 LGTM

…o primitive value.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
@dbatyai dbatyai force-pushed the array_indexof_leak branch from cc32d50 to 337c7cf Compare July 22, 2015 13:37
@egavrin
Copy link
Contributor

egavrin commented Jul 24, 2015

Merged 27161d3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Undesired behaviour ecma builtins Related to ECMA built-in routines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants