summaryrefslogtreecommitdiff
path: root/ext/webgpu
diff options
context:
space:
mode:
Diffstat (limited to 'ext/webgpu')
-rw-r--r--ext/webgpu/src/01_webgpu.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/webgpu/src/01_webgpu.js b/ext/webgpu/src/01_webgpu.js
index 792267bda..eb239bab8 100644
--- a/ext/webgpu/src/01_webgpu.js
+++ b/ext/webgpu/src/01_webgpu.js
@@ -41,6 +41,7 @@
Uint32Array,
Uint32ArrayPrototype,
Uint8Array,
+ WeakRef,
} = window.__bootstrap.primordials;
const _rid = Symbol("[[rid]]");
@@ -1893,7 +1894,7 @@
throw new DOMException(`${prefix}: invalid state.`, "OperationError");
}
for (let i = 0; i < mappedRanges.length; ++i) {
- const [buffer, _rid, start] = mappedRanges[i];
+ const { 0: buffer, /* 1: rid, */ 2: start } = mappedRanges[i];
// TODO(lucacasonato): is this logic correct?
const end = start + buffer.byteLength;
if (
@@ -1962,7 +1963,7 @@
throw new DOMException(`${prefix}: invalid state.`, "OperationError");
}
for (let i = 0; i < mappedRanges.length; ++i) {
- const [buffer, mappedRid] = mappedRanges[i];
+ const { 0: buffer, 1: mappedRid } = mappedRanges[i];
const { err } = ops.op_webgpu_buffer_unmap(
bufferRid,
mappedRid,