Commit 4035bba
committed
fix(webgpu): reading a mapped buffer throws on a detached ArrayBuffer
Cloning a buffer duplicated its cached mapped ArrayBuffer rather than sharing it, so unmapping through one clone left every other clone holding an ArrayBuffer that Javascript had already detached. The next read built a Uint8Array view over that buffer and threw "Cannot perform Construct on a detached ArrayBuffer". The same applies to the mapped range recorded by map_async, which was invisible to any other clone.
Upstream carries this same change from 29.0.1 onward; 27.0.4 is still affected.1 parent 1a272dc commit 4035bba
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1215 | 1215 | | |
1216 | 1216 | | |
1217 | 1217 | | |
1218 | | - | |
1219 | | - | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
1220 | 1221 | | |
1221 | 1222 | | |
1222 | 1223 | | |
| |||
1226 | 1227 | | |
1227 | 1228 | | |
1228 | 1229 | | |
1229 | | - | |
| 1230 | + | |
1230 | 1231 | | |
1231 | 1232 | | |
1232 | | - | |
| 1233 | + | |
1233 | 1234 | | |
1234 | 1235 | | |
1235 | 1236 | | |
| |||
0 commit comments