diff options
author | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2022-05-02 20:46:24 +0300 |
---|---|---|
committer | RafaelGSS <rafael.nunu@hotmail.com> | 2022-05-10 15:13:16 +0300 |
commit | e74a8da287329d5d1901b698029ef6c2dc75c5fd (patch) | |
tree | 9517f028e325ad673192894d4789e95015861e14 /lib | |
parent | 88692d8fd617b8d5225bde447e448fcb2b933e76 (diff) |
assert: make `assert.fail` less affected by prototype tampering
PR-URL: https://github.com/nodejs/node/pull/42918
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/internal/assert/assertion_error.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/internal/assert/assertion_error.js b/lib/internal/assert/assertion_error.js index 837c37b1221..e160d6d7e86 100644 --- a/lib/internal/assert/assertion_error.js +++ b/lib/internal/assert/assertion_error.js @@ -441,6 +441,7 @@ class AssertionError extends Error { this.generatedMessage = !message; ObjectDefineProperty(this, 'name', { + __proto__: null, value: 'AssertionError [ERR_ASSERTION]', enumerable: false, writable: true, |