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

textDecoder.decode() doesn't accept SharedArrayBuffers #32199

Closed
bmeck opened this issue Mar 11, 2020 · 0 comments
Closed

textDecoder.decode() doesn't accept SharedArrayBuffers #32199

bmeck opened this issue Mar 11, 2020 · 0 comments
Assignees
Labels
encoding Issues and PRs related to the TextEncoder and TextDecoder APIs. util Issues and PRs related to the built-in util module.

Comments

@bmeck
Copy link
Member

bmeck commented Mar 11, 2020

  • Version: v14.0.0-pre
  • Platform: OSX
  • Subsystem: util

What steps will reproduce the bug?

new TextDecoder().decode(new SharedArrayBuffer(0));

How often does it reproduce? Is there a required condition?

Always reproduces.

What is the expected behavior?

Per https://encoding.spec.whatwg.org/#dom-textdecoder-decode it should accept SharedArrayBuffers and act like

new TextDecoder().decode(new ArrayBuffer(0));

What do you see instead?

TypeError [ERR_INVALID_ARG_TYPE]: The "input" argument must be an instance of ArrayBuffer or ArrayBufferView. Received an instance of SharedArrayBuffer

Additional information

@bmeck bmeck added the util Issues and PRs related to the built-in util module. label Mar 11, 2020
@bmeck bmeck self-assigned this Mar 11, 2020
@addaleax addaleax added the encoding Issues and PRs related to the TextEncoder and TextDecoder APIs. label Mar 11, 2020
BridgeAR pushed a commit that referenced this issue Mar 17, 2020
PR-URL: #32203
Fixes: #32199
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins pushed a commit that referenced this issue Mar 24, 2020
PR-URL: #32203
Fixes: #32199
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
targos pushed a commit that referenced this issue Apr 22, 2020
PR-URL: #32203
Fixes: #32199
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
encoding Issues and PRs related to the TextEncoder and TextDecoder APIs. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants