| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9dda771 commit eb19acb
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,11 +5,9 @@ const assert = require('assert'); | |||
| 5 | 5 | const vm = require('vm'); | |
| 6 | 6 | const o = vm.createContext({ console: console }); | |
| 7 | 7 | ||
| 8 | - // This triggers the setter callback in node_contextify.cc | ||
| 8 | + // Function declaration and expression should both be copied to the | ||
| 9 | + // sandboxed context. | ||
| 9 | 10 | let code = 'var a = function() {};\n'; | |
| 10 | - | ||
| 11 | - // but this does not, since function decls are defineProperties, | ||
| 12 | - // not simple sets. | ||
| 13 | 11 | code += 'function b(){}\n'; | |
| 14 | 12 | ||
| 15 | 13 | // Grab the global b function as the completion value, to ensure that | |
| Back | FazBrowse Home | New Git URL |
0 commit comments