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

Normative: throw when trying to write to a detached buffer #43

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

bakkot
Copy link
Collaborator

@bakkot bakkot commented Jan 24, 2024

Fixes #40, cc @anba.

I originally treated detached/OOB buffers as zero-length to match TextEncoder's encodeInto, but that was probably an oversight and might be fixable.

So we throw instead.

@bakkot bakkot merged commit 67c5b29 into main Jan 25, 2024
1 check passed
@bakkot bakkot deleted the throw-on-detached branch January 25, 2024 00:10
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.

Out-of-bounds TypedArrays should be rejected
1 participant