<!-- Thank you for reporting an issue. This issue tracker is for bugs and issues found within Node.js core. If you require more general support please file an issue on our help repo. https://github.com/nodejs/help Please fill in as much of the template below as you're able. Version: output of `node -v` Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows) Subsystem: if known, please specify affected core module name If possible, please provide code that demonstrates the problem, keeping it as simple and free of external dependencies as you are able. --> * **Version**: current master * **Platform**: OS X * **Subsystem**: vm <!-- Enter your issue details below this comment. --> Data properties defined with the Object.defineProperty call inside the vm context are not copied onto the sandbox in the current master. Test: ``` 'use strict'; require('../common'); var vm = require('vm'); const util = require('util'); const sandbox = {}; const context = vm.createContext(sandbox); const code = ` Object.defineProperty(this, "foo", {value: 5}); `; const res = vm.runInContext(code, context); console.log(util.inspect(sandbox)); // returns: {} ``` In v6.2.0 (homebrew installation): ``` > node test_setter.js { foo: 5 } ``` Debugging the core shows failure in GlobalPropertySetterCallback. ``` ctx->sandbox()->Set(property, value); ``` does not set 'foo' on the sandbox (*property* and *value* are as expected). 'foo' is present on the global object, but also not returned by ``` Local<Array> names = global->GetOwnPropertyNames(context).ToLocalChecked(); ``` in CopyProperties.