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:
parent
f85b006628
commit
023f028186
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue