diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2023-01-20 01:22:18 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-19 21:52:18 +0530 |
commit | 023f0281869105255dc5b821c8243075080488f5 (patch) | |
tree | 13d353550dada8ab769635b76a7560ee26971811 /core/00_primordials.js | |
parent | f85b006628de5168b0fef42970ca97fa3033f34e (diff) |
refactor(core): Overwrite `ArrayPrototypeToString` in primordials (#17470)
Diffstat (limited to 'core/00_primordials.js')
-rw-r--r-- | core/00_primordials.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/00_primordials.js b/core/00_primordials.js index d394d1294..dbbba78b7 100644 --- a/core/00_primordials.js +++ b/core/00_primordials.js @@ -292,6 +292,7 @@ const { ArrayPrototypeForEach, + ArrayPrototypeJoin, ArrayPrototypeMap, FunctionPrototypeCall, ObjectDefineProperty, @@ -302,6 +303,7 @@ PromisePrototype, PromisePrototypeThen, SymbolIterator, + TypedArrayPrototypeJoin, } = primordials; // Because these functions are used by `makeSafe`, which is exposed @@ -457,6 +459,12 @@ }, ); + primordials.ArrayPrototypeToString = (thisArray) => + ArrayPrototypeJoin(thisArray); + + primordials.TypedArrayPrototypeToString = (thisArray) => + TypedArrayPrototypeJoin(thisArray); + primordials.PromisePrototypeCatch = (thisPromise, onRejected) => PromisePrototypeThen(thisPromise, undefined, onRejected); |