summaryrefslogtreecommitdiff
path: root/ext/webgpu/01_webgpu.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/webgpu/01_webgpu.js')
-rw-r--r--ext/webgpu/01_webgpu.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/webgpu/01_webgpu.js b/ext/webgpu/01_webgpu.js
index 3531dd797..be880d81d 100644
--- a/ext/webgpu/01_webgpu.js
+++ b/ext/webgpu/01_webgpu.js
@@ -32,6 +32,7 @@
PromisePrototypeThen,
PromiseReject,
PromiseResolve,
+ SafeArrayIterator,
Set,
SetPrototypeEntries,
SetPrototypeForEach,
@@ -543,7 +544,9 @@
}
[SymbolFor("Deno.privateCustomInspect")](inspect) {
- return `${this.constructor.name} ${inspect([...this.values()])}`;
+ return `${this.constructor.name} ${
+ inspect([...new SafeArrayIterator(this.values())])
+ }`;
}
}
@@ -1923,7 +1926,7 @@
const { err } = core.opSync("op_webgpu_buffer_unmap", {
bufferRid,
mappedRid,
- }, ...(write ? [new Uint8Array(buffer)] : []));
+ }, ...new SafeArrayIterator(write ? [new Uint8Array(buffer)] : []));
device.pushError(err);
if (err) return;
}