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

Test that HasVarDeclaration accounts for bindings created via eval() #3914

Merged
merged 2 commits into from
Sep 28, 2023

Conversation

shvaikalesh
Copy link
Member

@shvaikalesh shvaikalesh requested a review from a team as a code owner September 10, 2023 00:55
@shvaikalesh shvaikalesh force-pushed the has-var-declaration-after-eval branch from 8f872fa to e1782e1 Compare September 10, 2023 01:10
@shvaikalesh
Copy link
Member Author

It appears (CI results) like $262.evalScript() doesn't actually perform https://tc39.es/ecma262/#sec-runtime-semantics-scriptevaluation for SpiderMonkey?

The following snippet

<!doctype html>
<meta charset="utf-8">
<script>eval("var foo");</script>
<script>let foo = 1;</script>

correctly throws SyntaxError in Firefox yet not in Chrome.

@shvaikalesh
Copy link
Member Author

shvaikalesh commented Sep 10, 2023

@shvaikalesh shvaikalesh force-pushed the has-var-declaration-after-eval branch from 91f337e to e1782e1 Compare September 10, 2023 04:42
@shvaikalesh
Copy link
Member Author

Thank you for review @anba!

After two-year break in contributing to test262, I've forgot that tests are running in strict mode as well 🤣

Accounted for comments in bcee172.

Copy link
Contributor

@anba anba left a comment

Choose a reason for hiding this comment

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

LGTM!

@Ms2ger Ms2ger force-pushed the has-var-declaration-after-eval branch from bcee172 to 6011109 Compare September 28, 2023 16:13
@Ms2ger Ms2ger enabled auto-merge (squash) September 28, 2023 16:14
@Ms2ger Ms2ger merged commit be53234 into tc39:main Sep 28, 2023
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.

3 participants