Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy input ArrayBuffers #700

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

a-sully
Copy link
Contributor

@a-sully a-sully commented Jun 3, 2024

Fixes #566


Preview | Diff

@a-sully a-sully force-pushed the dont-transfer-input-arraybuffers branch from 49edccb to e52d259 Compare July 7, 2024 20:29
@inexorabletash
Copy link
Member

My reading of "get a copy of the bytes" is that if the buffer is detached then an empty byte sequence is returned but we don't explicitly throw.

Per #351 (and my #723) we want to error if transferring a detached buffer (which will still be used for output buffers). Should we error for detached input buffers too?

I think that just requires adding If |view| is [=BufferSource/detached=], then throw a {{TypeError}}. to the steps.

(I think we'd still end up throwing in most cases since the subsequent size check will fail. Although if allow 0 size dimensions (#391) there would be a weird case where it might slip through that check. Harmless, but weird?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't transfer input ArrayBuffers
2 participants