Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bed6acb

Browse filesBrowse files
committed
Revert "src: fix delete operator on vm context"
This reverts commit 587857e. It was found to have subtle behavior changes in deleting objects. PR-URL: #12721 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
1 parent aae3765 commit bed6acb
Copy full SHA for bed6acb

File tree

Expand file treeCollapse file tree

2 files changed

+3
-7
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-7
lines changed
Open diff view settings
Collapse file

‎src/node_contextify.cc‎

Copy file name to clipboardExpand all lines: src/node_contextify.cc
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -441,12 +441,8 @@ class ContextifyContext {
441441

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

444-
if (success.FromMaybe(false))
445-
return;
446-
447-
// Delete failed on the sandbox, intercept and do not delete on
448-
// the global object.
449-
args.GetReturnValue().Set(false);
444+
if (success.IsJust())
445+
args.GetReturnValue().Set(success.FromJust());
450446
}
451447

452448

Collapse file

‎…st/parallel/test-vm-deleting-property.js‎ ‎…nown_issues/test-vm-deleting-property.js‎test/parallel/test-vm-deleting-property.js renamed to test/known_issues/test-vm-deleting-property.js test/parallel/test-vm-deleting-property.js renamed to test/known_issues/test-vm-deleting-property.js

Copy file name to clipboardExpand all lines: test/known_issues/test-vm-deleting-property.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ const res = vm.runInContext(`
1212
Object.getOwnPropertyDescriptor(this, 'x');
1313
`, context);
1414

15-
assert.strictEqual(res, undefined);
15+
assert.strictEqual(res.value, undefined);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.