summaryrefslogtreecommitdiff
path: root/ext/webgpu/src/01_webgpu.js
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2023-01-17 01:17:18 +0900
committerGitHub <noreply@github.com>2023-01-16 17:17:18 +0100
commit6da958d7ec31f2ffd21bb2beb8cc193a62afc55c (patch)
tree348fb3669348653b3907068b9ddc00f2652bdbfa /ext/webgpu/src/01_webgpu.js
parent40134ffc99848c89e0ab88c03ca85b9122e2384b (diff)
chore: update dlint to v0.37.0 for GitHub Actions (#17295)
Updated third_party dlint to v0.37.0 for GitHub Actions. This PR includes following changes: * fix(prefer-primordials): Stop using array pattern assignments * fix(prefer-primordials): Stop using global intrinsics except for `SharedArrayBuffer` * feat(guard-for-in): Apply new guard-for-in rule
Diffstat (limited to 'ext/webgpu/src/01_webgpu.js')
-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,