Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fa1fa31

Browse filesBrowse files
bfarias-godaddyMylesBorins
authored andcommitted
util: text decoding allows SharedArrayBuffer
PR-URL: #32203 Fixes: #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
Copy full SHA for fa1fa31

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎lib/internal/encoding.js‎

Copy file name to clipboardExpand all lines: lib/internal/encoding.js
+3-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.