mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 04:39:10 +00:00
chore: Update dlint (#17031)
Introduces `SafeSetIterator` and `SafeMapIterator` to primordials
This commit is contained in:
parent
2ac575abfb
commit
948f85216a
31 changed files with 222 additions and 141 deletions
|
@ -12,6 +12,7 @@
|
|||
Uint8Array,
|
||||
ArrayPrototypePush,
|
||||
MathMin,
|
||||
SafeArrayIterator,
|
||||
TypedArrayPrototypeSubarray,
|
||||
TypedArrayPrototypeSet,
|
||||
} = window.__bootstrap.primordials;
|
||||
|
@ -156,14 +157,14 @@
|
|||
|
||||
function concatBuffers(buffers) {
|
||||
let totalLen = 0;
|
||||
for (const buf of buffers) {
|
||||
for (const buf of new SafeArrayIterator(buffers)) {
|
||||
totalLen += buf.byteLength;
|
||||
}
|
||||
|
||||
const contents = new Uint8Array(totalLen);
|
||||
|
||||
let n = 0;
|
||||
for (const buf of buffers) {
|
||||
for (const buf of new SafeArrayIterator(buffers)) {
|
||||
TypedArrayPrototypeSet(contents, buf, n);
|
||||
n += buf.byteLength;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue