Skip to content

testing HostEnsureCanCompileStrings #2120

@mikesamuel

Description

@mikesamuel

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions