-
Notifications
You must be signed in to change notification settings - Fork 329
Description
Currently, if the device is lost naturally (not destroyed), a pending mapAsync()
promise will reject with OperationError
.
If it is destroyed, it rejects with AbortError
(destroying the device implicitly unmaps all buffers, which cancel pending maps with unmap()
, which produces AbortError
).
This is (1) kind of self-inconsistent and (2) inconsistent with our other usages of OperationError
where I believe it always means there was some incorrect use of the API. This is not an incorrect use of the API.
It's unfortunately not easy to test because it relies on natural device loss (see #4177 which would fix this), and we haven't tried to test it. Chromium currently implements this incorrectly and rejects with AbortError
in both cases.
I'm labeling this Milestone 0
and potentially breaking
, though the chances that anyone is relying on this behavior seems extremely small.
EDIT: s/throw/reject/