commit | 28258a5769a4212fec19a467f1dd4afa886b8179 | [log] [tgz] |
---|---|---|
author | Kai Ninomiya <kainino@chromium.org> | Mon Dec 02 19:04:14 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Dec 02 19:04:14 2024 +0000 |
tree | da5b16392a0daeebaeb255dd47f80867509b9bd3 | |
parent | f9b6b90101226599959feac6dd46781d5bf8ba3b [diff] |
[emscripten] Fix handling of errors in MapAsync Caught by Closure Compiler pass on https://github.com/kainino0x/webgpu-cross-platform-demo/tree/dawnwasm No-Try: true Bug: none Change-Id: Ibc6e1c025fa2afdfcdf5f0849d0815be9ad6e0ff Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/217095 Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Loko Kung <lokokung@google.com>
diff --git a/third_party/emdawnwebgpu/library_webgpu.js b/third_party/emdawnwebgpu/library_webgpu.js index d1835cb..0f65a6a 100644 --- a/third_party/emdawnwebgpu/library_webgpu.js +++ b/third_party/emdawnwebgpu/library_webgpu.js
@@ -961,8 +961,8 @@ var sp = stackSave(); var messagePtr = stringToUTF8OnStack(ex.message); var status = - ex instanceof AbortError ? {{{ gpu.MapAsyncStatus.Aborted }}} : - ex instanceof OperationError ? {{{ gpu.MapAsyncStatus.Error }}} : + ex.name === 'AbortError' ? {{{ gpu.MapAsyncStatus.Aborted }}} : + ex.name === 'OperationError' ? {{{ gpu.MapAsyncStatus.Error }}} : {{{ gpu.MapAsyncStatus.Unknown }}}; _emwgpuOnMapAsyncCompleted(futureId, status, messagePtr); delete WebGPU.Internals.bufferOnUnmaps[bufferPtr];