src: make EnvDelete behave like the delete operator · nodejs/node@317ae96 · GitHub
Skip to content

Commit 317ae96

Browse files
fhinkelcjihrig
authored andcommitted
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 317ae96

2 files changed

Lines changed: 24 additions & 25 deletions

File tree

src/node.cc

Lines changed: 6 additions & 11 deletions

test/parallel/test-process-env.js

Lines changed: 18 additions & 14 deletions

0 commit comments

Comments
 (0)