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
Backport-PR-URL: https://github.com/nodejs/node/pull/43804
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 authored and Michaël Zasso committed 2022-07-31 09:44:45 +02:00
1 parent f1c12aa6df
commit cd55e221b5
76 files changed
+398 -83

No files matched your search

+3
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() {