summaryrefslogtreecommitdiff
path: root/runtime/js/12_io.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/12_io.js')
-rw-r--r--runtime/js/12_io.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/js/12_io.js b/runtime/js/12_io.js
index b384e1528..f6b2d6b87 100644
--- a/runtime/js/12_io.js
+++ b/runtime/js/12_io.js
@@ -12,7 +12,6 @@
Uint8Array,
ArrayPrototypePush,
MathMin,
- SafeArrayIterator,
TypedArrayPrototypeSubarray,
TypedArrayPrototypeSet,
} = window.__bootstrap.primordials;
@@ -157,14 +156,15 @@
function concatBuffers(buffers) {
let totalLen = 0;
- for (const buf of new SafeArrayIterator(buffers)) {
- totalLen += buf.byteLength;
+ for (let i = 0; i < buffers.length; ++i) {
+ totalLen += buffers[i].byteLength;
}
const contents = new Uint8Array(totalLen);
let n = 0;
- for (const buf of new SafeArrayIterator(buffers)) {
+ for (let i = 0; i < buffers.length; ++i) {
+ const buf = buffers[i];
TypedArrayPrototypeSet(contents, buf, n);
n += buf.byteLength;
}