diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-02-07 13:54:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-07 13:54:32 +0100 |
commit | bf22f114a6e049744866ebaba48faec2cb86549b (patch) | |
tree | ea6814e51bade2355144546f21178f54811a57f2 /ext/webgpu/01_webgpu.js | |
parent | 9c7ed1c98b75c3557ac9e269212dcf655f69c0a2 (diff) |
refactor: update runtime code for primordial check for iterators (#13510)
Diffstat (limited to 'ext/webgpu/01_webgpu.js')
-rw-r--r-- | ext/webgpu/01_webgpu.js | 7 |
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; } |