mirror of
https://github.com/denoland/deno.git
synced 2025-01-18 03:44:05 -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 {
|
const {
|
||||||
ArrayPrototypeForEach,
|
ArrayPrototypeForEach,
|
||||||
|
ArrayPrototypeJoin,
|
||||||
ArrayPrototypeMap,
|
ArrayPrototypeMap,
|
||||||
FunctionPrototypeCall,
|
FunctionPrototypeCall,
|
||||||
ObjectDefineProperty,
|
ObjectDefineProperty,
|
||||||
|
@ -302,6 +303,7 @@
|
||||||
PromisePrototype,
|
PromisePrototype,
|
||||||
PromisePrototypeThen,
|
PromisePrototypeThen,
|
||||||
SymbolIterator,
|
SymbolIterator,
|
||||||
|
TypedArrayPrototypeJoin,
|
||||||
} = primordials;
|
} = primordials;
|
||||||
|
|
||||||
// Because these functions are used by `makeSafe`, which is exposed
|
// 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) =>
|
primordials.PromisePrototypeCatch = (thisPromise, onRejected) =>
|
||||||
PromisePrototypeThen(thisPromise, undefined, onRejected);
|
PromisePrototypeThen(thisPromise, undefined, onRejected);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue