Skip to content

Commit ff89dbe

Browse files
committed
fixup! lib: add SafeArray to primordials and use it for FreeList
1 parent fdbb1ce commit ff89dbe

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/internal/per_context/primordials.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,15 +471,17 @@ primordials.SafeArray = makeSafe(
471471
},
472472
primordials.ArrayIteratorPrototypeNext,
473473
{
474+
__proto__: null,
474475
// Many of the array methods have a length of 0 and return
475476
// a primitive or an iterable that isn't an iterator, which breaks
476477
// the assumptions about which methods return iterators in `makeSafe`
477478
iteratorMethods: ['entries', 'keys', 'values', SymbolIterator],
478479
// `Array` doesn't have a `Symbol.toStringTag` by default
479480
prototypeProperties: {
480-
[SymbolToStringTag]: { value: 'SafeArray' }
481-
}
482-
}
481+
__proto__: null,
482+
[SymbolToStringTag]: { __proto__: null, value: 'SafeArray' },
483+
},
484+
},
483485
);
484486
primordials.SafeMap = makeSafe(
485487
Map,

0 commit comments

Comments
 (0)