Skip to content

Remove invalid assertion in ecma_builtin_global_object_eval #220

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 23, 2015

Conversation

ruben-ayrapetyan
Copy link
Contributor

The removed assertion checked that this argument can't be equal to undefined in direct call to eval.
Actually, this can be not equal to undefined in case direct call to eval is performed from with block.

Related issue: #212

@@ -60,8 +60,6 @@ ecma_builtin_global_object_eval (ecma_value_t this_arg, /**< this argument */
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();

bool is_direct_eval = vm_is_direct_eval_form_call ();
JERRY_ASSERT (!(is_direct_eval
Copy link
Contributor

Choose a reason for hiding this comment

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

ecma_value_t this_arg should be marked as unused.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@egavrin, thanks.

I've updated pull request.

@egavrin
Copy link
Contributor

egavrin commented Jun 20, 2015

Good to me

@ruben-ayrapetyan ruben-ayrapetyan assigned galpeter and unassigned egavrin Jun 21, 2015
@galpeter
Copy link
Contributor

lgtm

@galpeter galpeter removed their assignment Jun 23, 2015
@egavrin
Copy link
Contributor

egavrin commented Jun 23, 2015

make push

The removed assertion checked that `this` argument can't be equal to `undefined` in direct call to eval.
Actually, `this` can be not equal to `undefined` in case direct call to eval is performed from `with` block.

Related issue: #212

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
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 normal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants