Skip to content

Commit 58c6422

Browse files
bfarias-godaddytargos
authored andcommitted
util: text decoding allows SharedArrayBuffer
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]>
1 parent 2e92cb4 commit 58c6422

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/internal/encoding.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const {
3131
} = require('internal/util');
3232

3333
const {
34-
isArrayBuffer,
34+
isAnyArrayBuffer,
3535
isArrayBufferView,
3636
isUint8Array
3737
} = require('internal/util/types');
@@ -404,7 +404,7 @@ function makeTextDecoderICU() {
404404

405405
decode(input = empty, options = {}) {
406406
validateDecoder(this);
407-
if (isArrayBuffer(input)) {
407+
if (isAnyArrayBuffer(input)) {
408408
input = lazyBuffer().from(input);
409409
} else if (!isArrayBufferView(input)) {
410410
throw new ERR_INVALID_ARG_TYPE('input',
@@ -469,7 +469,7 @@ function makeTextDecoderJS() {
469469

470470
decode(input = empty, options = {}) {
471471
validateDecoder(this);
472-
if (isArrayBuffer(input)) {
472+
if (isAnyArrayBuffer(input)) {
473473
input = lazyBuffer().from(input);
474474
} else if (isArrayBufferView(input)) {
475475
input = lazyBuffer().from(input.buffer, input.byteOffset,

0 commit comments

Comments
 (0)