| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2db4c3c commit 587857e
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -441,8 +441,12 @@ class ContextifyContext { | |||
| 441 | 441 | ||
| 442 | 442 | Maybe<bool> success = ctx->sandbox()->Delete(ctx->context(), property); | |
| 443 | 443 | ||
| 444 | - if (success.IsJust()) | ||
| 445 | - args.GetReturnValue().Set(success.FromJust()); | ||
| 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); | ||
| 446 | 450 | } | |
| 447 | 451 | ||
| 448 | 452 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,4 +12,4 @@ const res = vm.runInContext(` | |||
| 12 | 12 | Object.getOwnPropertyDescriptor(this, 'x'); | |
| 13 | 13 | `, context); | |
| 14 | 14 | ||
| 15 | - assert.strictEqual(res.value, undefined); | ||
| 15 | + assert.strictEqual(res, undefined); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments