Commit 317ae96
src: make EnvDelete behave like the delete operator
According to TC39 specification, the delete
operator returns false or throws
in strict mode, if the property is
non-configurable. It returns true in all other cases.
Process.env can never have non-configurable
properties, thus EnvDelete must always return true. This
is independent of strict mode.
Fixes: #7960
PR-URL: #7975
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>1 parent cb0baca commit 317ae96Copy full SHA for 317ae96
File tree
Expand file treeCollapse file tree
2 files changed
+24
-25
lines changedOpen diff view settings
Filter options
- src
- test/parallel
Expand file treeCollapse file tree
2 files changed
+24
-25
lines changedOpen diff view settings
Collapse file
+6-11Lines changed: 6 additions & 11 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2774 | 2774 | |
2775 | 2775 | |
2776 | 2776 | |
2777 | | - |
2778 | 2777 | |
2779 | 2778 | |
2780 | | - |
2781 | | - |
2782 | | - |
| 2779 | + |
2783 | 2780 | |
2784 | 2781 | |
2785 | 2782 | |
2786 | | - |
2787 | | - |
2788 | | - |
2789 | | - |
2790 | | - |
2791 | | - |
| 2783 | + |
2792 | 2784 | |
2793 | | - |
| 2785 | + |
| 2786 | + |
| 2787 | + |
| 2788 | + |
2794 | 2789 | |
2795 | 2790 | |
2796 | 2791 | |
|
Collapse file
test/parallel/test-process-env.js
Copy file name to clipboardExpand all lines: test/parallel/test-process-env.js+18-14Lines changed: 18 additions & 14 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
| 5 | + |
| 6 | + |
10 | 7 | |
11 | 8 | |
12 | 9 | |
| ||
16 | 13 | |
17 | 14 | |
18 | 15 | |
| 16 | + |
| 17 | + |
19 | 18 | |
20 | 19 | |
21 | 20 | |
| ||
27 | 26 | |
28 | 27 | |
29 | 28 | |
30 | | - |
31 | | - |
32 | | - |
| 29 | + |
| 30 | + |
| 31 | + |
33 | 32 | |
34 | 33 | |
35 | | - |
| 34 | + |
36 | 35 | |
37 | 36 | |
38 | | - |
| 37 | + |
39 | 38 | |
40 | | - |
| 39 | + |
41 | 40 | |
42 | 41 | |
43 | 42 | |
44 | 43 | |
45 | | - |
| 44 | + |
46 | 45 | |
47 | 46 | |
48 | | - |
| 47 | + |
49 | 48 | |
50 | 49 | |
51 | | - |
| 50 | + |
52 | 51 | |
53 | 52 | |
54 | 53 | |
| ||
59 | 58 | |
60 | 59 | |
61 | 60 | |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
0 commit comments