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

util: text decoding allows SharedArrayBuffer #32203

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/internal/encoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const {
} = require('internal/util');

const {
isArrayBuffer,
isAnyArrayBuffer,
isArrayBufferView,
isUint8Array
} = require('internal/util/types');
Expand Down Expand Up @@ -404,7 +404,7 @@ function makeTextDecoderICU() {

decode(input = empty, options = {}) {
validateDecoder(this);
if (isArrayBuffer(input)) {
if (isAnyArrayBuffer(input)) {
input = lazyBuffer().from(input);
} else if (!isArrayBufferView(input)) {
throw new ERR_INVALID_ARG_TYPE('input',
Expand Down Expand Up @@ -469,7 +469,7 @@ function makeTextDecoderJS() {

decode(input = empty, options = {}) {
validateDecoder(this);
if (isArrayBuffer(input)) {
if (isAnyArrayBuffer(input)) {
input = lazyBuffer().from(input);
} else if (isArrayBufferView(input)) {
input = lazyBuffer().from(input.buffer, input.byteOffset,
Expand Down