src: fix delete operator on vm context
In the implementation of the vm module, if a property is successfully deleted on the sandbox, we also need to delete it on the global_proxy object. Therefore, we must not call args.GetReturnValue().Set().
We only intercept, i.e., call args.GetReturnValue().Set(), in the DeleterCallback, if Delete() failed, e.g. because the property was read only.
This is a breaking change, it fixes one of our known issues. But it does not break any tests in Jest.
Fixes https://github.com/nodejs/node/issues/6287
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
src
If anybody has a better way to word the commit message, I'll happily take it!