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

testing HostEnsureCanCompileStrings #2120

Closed
mikesamuel opened this issue Apr 2, 2019 · 2 comments
Closed

testing HostEnsureCanCompileStrings #2120

mikesamuel opened this issue Apr 2, 2019 · 2 comments

Comments

@mikesamuel
Copy link
Member

mikesamuel commented Apr 2, 2019

It's possible to test corner cases around HostEnsureCanCompileStrings from a browser or command line using tricks like those in tc39/ecma262 issue #1495:

<meta http-equiv="Content-Security-Policy" content="script-src 'nonce-test'">
<script nonce="test">
// Code to run with HostEnsureCanCompileStrings is false
</script>

or

$ npx node@10 --disallow_code_generation_from_strings -e '// Code to run'

Quite a few of these interactions could be tested if there was simply a way to get HostEnsureCanCompileStrings to throw for a particular testcase without breaking tests that assumes it returns normally like those under test/language/eval-code.

Even more interactions could be tested if it could be turned off only for particular values of calleeRealm.

@mikesamuel
Copy link
Member Author

Apparently web-platform-tests provides an alternative for JS engines that are used in browsers.

@rwaldron
Copy link
Contributor

The associated PR tc39/ecma262#1498 hasn't had author activity since June 2019. We can reopen here if there is anything that needs to be done in Test262

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

No branches or pull requests

2 participants