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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
78 changed files with 444 additions and 83 deletions

View file

@ -238,12 +238,14 @@ class AsyncResource {
}
ObjectDefineProperties(bound, {
'length': {
__proto__: null,
configurable: true,
enumerable: false,
value: fn.length,
writable: false,
},
'asyncResource': {
__proto__: null,
configurable: true,
enumerable: true,
value: this,