diff --git a/src/node_contextify.cc b/src/node_contextify.cc index b8b60e97adcd17..741f568259a1a6 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -441,12 +441,8 @@ class ContextifyContext { Maybe 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()); } diff --git a/test/parallel/test-vm-deleting-property.js b/test/known_issues/test-vm-deleting-property.js similarity index 88% rename from test/parallel/test-vm-deleting-property.js rename to test/known_issues/test-vm-deleting-property.js index 994aa0aff94f2d..cda3371a33bf16 100644 --- a/test/parallel/test-vm-deleting-property.js +++ b/test/known_issues/test-vm-deleting-property.js @@ -12,4 +12,4 @@ const res = vm.runInContext(` Object.getOwnPropertyDescriptor(this, 'x'); `, context); -assert.strictEqual(res, undefined); +assert.strictEqual(res.value, undefined);