lib: use null-prototype objects for property descriptors

Refs: https://github.com/nodejs/node/pull/42921

PR-URL: https://github.com/nodejs/node/pull/43270
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
This commit is contained in:
Antoine du Hamel
2022-06-03 10:23:58 +02:00
committed by GitHub
parent 218664f638
commit 06d8606960
78 changed files with 444 additions and 83 deletions

View File

@@ -140,6 +140,7 @@ StringDecoder.prototype.text = function text(buf, offset) {
ObjectDefineProperties(StringDecoder.prototype, {
lastChar: {
__proto__: null,
configurable: true,
enumerable: true,
get() {
@@ -149,6 +150,7 @@ ObjectDefineProperties(StringDecoder.prototype, {
}
},
lastNeed: {
__proto__: null,
configurable: true,
enumerable: true,
get() {
@@ -156,6 +158,7 @@ ObjectDefineProperties(StringDecoder.prototype, {
}
},
lastTotal: {
__proto__: null,
configurable: true,
enumerable: true,
get() {