Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Revert "src: fix delete operator on vm context"
This reverts commit 587857e. It was found to have subtle
behavior changes
  • Loading branch information
MylesBorins committed Apr 28, 2017
commit 8efd42aebbee04e2ebd21c4f52d3314b5a20dc81
8 changes: 2 additions & 6 deletions src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -441,12 +441,8 @@ class ContextifyContext {

Maybe<bool> success = ctx->sandbox()->Delete(ctx->context(), property);

if (success.FromMaybe(false))
return;

// Delete failed on the sandbox, intercept and do not delete on
// the global object.
args.GetReturnValue().Set(false);
if (success.IsJust())
args.GetReturnValue().Set(success.FromJust());
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ const res = vm.runInContext(`
Object.getOwnPropertyDescriptor(this, 'x');
`, context);

assert.strictEqual(res, undefined);
assert.strictEqual(res.value, undefined);