Skip to content

Commit

Permalink
TextDecoder's decode() supports shared buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Feb 1, 2024
1 parent 71ddae6 commit 3d0bc46
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions encoding/sharedarraybuffer.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
test(() => {
const decoder = new TextDecoder('utf-8');
const buffer = new SharedArrayBuffer(4);
assert_throws_js(TypeError, () => {
decoder.decode(new Uint8Array(buffer));
}, 'constructing TextDecoder with SharedArrayBuffer view should throw');
assert_equals(decoder.decode(new Uint8Array(buffer)), "\u0000\u0000\u0000\u0000");
}, 'decoding SharedArrayBuffer');

</script>

0 comments on commit 3d0bc46

Please sign in to comment.