Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAntoine du Hamel <duhamelantoine1995@gmail.com>2022-05-02 20:46:24 +0300
committerRafaelGSS <rafael.nunu@hotmail.com>2022-05-10 15:13:16 +0300
commite74a8da287329d5d1901b698029ef6c2dc75c5fd (patch)
tree9517f028e325ad673192894d4789e95015861e14 /lib
parent88692d8fd617b8d5225bde447e448fcb2b933e76 (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.js1
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,