Skip to content

Commit

Permalink
Restore CI for the V8 runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed May 15, 2021
1 parent d19a51d commit 3e94078
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install V8
run: |
brew update
brew install v8
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
9 changes: 8 additions & 1 deletion lib/execjs/support/v8_runner.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
(function(program, execJS) { execJS(program) })(function() { #{source}
(function(program, execJS) { execJS(program) })(function(console, setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, clearImmediate) { #{source}
}, function(program) {
var output;
try {
delete this.console;
delete this.setTimeout;
delete this.setInterval;
delete this.clearTimeout;
delete this.clearInterval;
delete this.setImmediate;
delete this.clearImmediate;
result = program();
if (typeof result == 'undefined' && result !== null) {
print('["ok"]');
Expand Down

0 comments on commit 3e94078

Please sign in to comment.