2 // Flags: --harmony_proxies
5 var assert = require('assert');
6 var vm = require('vm');
8 // src/node_contextify.cc filters out the Proxy object from the parent
9 // context. Make sure that the new context has a Proxy object of its own.
11 vm.runInNewContext('this.Proxy = Proxy', sandbox);
12 assert(typeof sandbox.Proxy === 'object');
13 assert(sandbox.Proxy !== Proxy);
15 // Unless we copy the Proxy object explicitly, of course.
16 sandbox = { Proxy: Proxy };
17 vm.runInNewContext('this.Proxy = Proxy', sandbox);
18 assert(typeof sandbox.Proxy === 'object');
19 assert(sandbox.Proxy === Proxy);