| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a0c705e commit 05909d0
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,15 +5,9 @@ var vm = require('vm'); | |||
| 5 | 5 | var spawn = require('child_process').spawn; | |
| 6 | 6 | ||
| 7 | 7 | if (process.argv[2] === 'child') { | |
| 8 | - var code = 'var j = 0;\n' + | ||
| 9 | - 'for (var i = 0; i < 1000000; i++) j += add(i, i + 1);\n' + | ||
| 10 | - 'j;'; | ||
| 8 | + const code = 'while(true);'; | ||
| 11 | 9 | ||
| 12 | - var ctx = vm.createContext({ | ||
| 13 | - add: function(x, y) { | ||
| 14 | - return x + y; | ||
| 15 | - } | ||
| 16 | - }); | ||
| 10 | + const ctx = vm.createContext(); | ||
| 17 | 11 | ||
| 18 | 12 | vm.runInContext(code, ctx, { timeout: 1 }); | |
| 19 | 13 | } else { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments