1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-03 04:48:52 -05:00

refactor(core): Overwrite ArrayPrototypeToString in primordials (#17470)

This commit is contained in:
Kenta Moriuchi 2023-01-20 01:22:18 +09:00 committed by GitHub
parent f85b006628
commit 023f028186
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);