diff --git a/src/node_contextify.cc b/src/node_contextify.cc index abf17f6c8d..48121be717 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -414,10 +414,6 @@ class ContextifyContext { bool success = PersistentToLocal(isolate, ctx->sandbox_)->Delete(property); - if (!success) { - success = PersistentToLocal(isolate, - ctx->proxy_global_)->Delete(property); - } args.GetReturnValue().Set(success); } diff --git a/test/simple/test-vm-context.js b/test/simple/test-vm-context.js index b3127d1b6e..c843addc69 100644 --- a/test/simple/test-vm-context.js +++ b/test/simple/test-vm-context.js @@ -73,3 +73,10 @@ script = vm.createScript('var assert = require(\'assert\'); assert.throws(' + 'function() { throw "hello world"; }, /hello/);', 'some.js'); script.runInNewContext({ require : require }); + +// Issue GH-7529 +script = vm.createScript('delete b'); +var ctx = {}; +Object.defineProperty(ctx, 'b', { configurable: false }); +ctx = vm.createContext(ctx); +assert.equal(script.runInContext(ctx), false);