mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
lib: use null-prototype objects for property descriptors
PR-URL: https://github.com/nodejs/node/pull/43473 Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
@@ -132,11 +132,13 @@ addBufferPrototypeMethods(Buffer.prototype);
|
||||
|
||||
const constants = ObjectDefineProperties({}, {
|
||||
MAX_LENGTH: {
|
||||
__proto__: null,
|
||||
value: kMaxLength,
|
||||
writable: false,
|
||||
enumerable: true
|
||||
},
|
||||
MAX_STRING_LENGTH: {
|
||||
__proto__: null,
|
||||
value: kStringMaxLength,
|
||||
writable: false,
|
||||
enumerable: true
|
||||
|
||||
@@ -1181,9 +1181,9 @@ function createTeeReadableStream(start, pull, cancel) {
|
||||
setupReadableStreamDefaultControllerFromSource(
|
||||
this,
|
||||
ObjectCreate(null, {
|
||||
start: { value: start },
|
||||
pull: { value: pull },
|
||||
cancel: { value: cancel }
|
||||
start: { __proto__: null, value: start },
|
||||
pull: { __proto__: null, value: pull },
|
||||
cancel: { __proto__: null, value: cancel }
|
||||
}),
|
||||
1,
|
||||
() => 1);
|
||||
|
||||
@@ -49,11 +49,13 @@ const kType = Symbol('kType');
|
||||
|
||||
const AsyncIterator = ObjectCreate(AsyncIteratorPrototype, {
|
||||
next: {
|
||||
__proto__: null,
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
},
|
||||
return: {
|
||||
__proto__: null,
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
||||
Reference in New Issue
Block a user