Skip to content

Commit

Permalink
test: add regression test for Proxy as vm context
Browse files Browse the repository at this point in the history
A Proxy context should not hide built-in global objects.
Ref: #6158

PR-URL: #6967
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
targos authored and rvagg committed Jun 2, 2016
1 parent 5990a7f commit 6f3f5af
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/parallel/test-vm-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,7 @@ assert.throws(function() {
}, function(err) {
return /expected-filename.js:33:130/.test(err.stack);
}, 'Expected appearance of proper offset in Error stack');

// https://github.com/nodejs/node/issues/6158
ctx = new Proxy({}, {});
assert.strictEqual(typeof vm.runInNewContext('String', ctx), 'function');

0 comments on commit 6f3f5af

Please sign in to comment.