-
Notifications
You must be signed in to change notification settings - Fork 536
testing HostEnsureCanCompileStrings #2120
Copy link
Copy link
Closed
Labels
Description
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.
Reactions are currently unavailable