From 023f0281869105255dc5b821c8243075080488f5 Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Fri, 20 Jan 2023 01:22:18 +0900 Subject: [PATCH] refactor(core): Overwrite `ArrayPrototypeToString` in primordials (#17470) --- core/00_primordials.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/00_primordials.js b/core/00_primordials.js index d394d12940..dbbba78b7e 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);