You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How should synchronous validation errors be exposed in getMappedRange? It can return null, but that doesn't tell the caller what went wrong. This would probably be fine, except e.g. Chromium needs to know what string to attach to the DOMException it generates. To do that now it needs to duplicate all of the validation that's already in getMappedRange.
IMHO the overlapping range validation should be on the Blink side only, because it stems from limitations of ArrayBuffer. Same thing for the alignment restrictions.
from last week's meeting: At least the safe Rust API will keep this validation because it's required for Rust safety guarantees. wgpu-core and the C API don't necessarily have to, still.
Activity
kainino0x commentedon Jul 16, 2020
(Which is especially problematic for the overlapping-range validation.)
Kangz commentedon Jul 16, 2020
IMHO the overlapping range validation should be on the Blink side only, because it stems from limitations of
ArrayBuffer. Same thing for the alignment restrictions.kainino0x commentedon Jul 16, 2020
Good point. Perhaps no issue here then.
kainino0x commentedon Jun 28, 2023
from last week's meeting: At least the safe Rust API will keep this validation because it's required for Rust safety guarantees. wgpu-core and the C API don't necessarily have to, still.
Kangz commentedon Jun 29, 2023
Do we have an explanation of why this is needed for the Rust safety guarantees? It seems it would only be to get mutable ranges?
kainino0x commentedon Jun 29, 2023
We didn't specifically talk about const ranges, maybe for const ranges overlaps are fine? @cwfitzgerald
cwfitzgerald commentedon Jun 29, 2023
Correct, const overlaps are fine, mutable overlaps are not.
kainino0x commentedon Sep 7, 2023
In June we had concluded:
However we discussed this more today in the broader context of reporting synchronous errors and came to a simpler conclusion:
Add and document many synchronous error statuses
Add and document many synchronous error statuses
Add and document many synchronous error statuses
Disallow GetConstMappedRange overlaps on Wasm