Skip to content

Commit fa1fa31

Browse files
bfarias-godaddyMylesBorins
authored andcommitted
util: text decoding allows SharedArrayBuffer
PR-URL: #32203Fixes: #32199 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent ae90bcc commit fa1fa31

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎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
}elseif(!isArrayBufferView(input)){
410410
thrownewERR_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
}elseif(isArrayBufferView(input)){
475475
input=lazyBuffer().from(input.buffer,input.byteOffset,

0 commit comments

Comments
 (0)