summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/_brotli.js
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2024-08-02 16:23:21 +0200
committerGitHub <noreply@github.com>2024-08-02 16:23:21 +0200
commit7495bcbf77349d708b249944a149c16f5ee0c667 (patch)
treed6b1250478c1d3b5b4670bfb8e90debf841a4bbc /ext/node/polyfills/_brotli.js
parente24aa6bbeca265454fea3592fc9fc18e6312556e (diff)
Revert "perf(ext/node): improve `Buffer` from string performance" (#24851)
Diffstat (limited to 'ext/node/polyfills/_brotli.js')
-rw-r--r--ext/node/polyfills/_brotli.js15
1 files changed, 2 insertions, 13 deletions
diff --git a/ext/node/polyfills/_brotli.js b/ext/node/polyfills/_brotli.js
index ce5db3230..1524bf85c 100644
--- a/ext/node/polyfills/_brotli.js
+++ b/ext/node/polyfills/_brotli.js
@@ -9,10 +9,7 @@ const {
TypedArrayPrototypeSlice,
TypedArrayPrototypeSubarray,
TypedArrayPrototypeGetByteLength,
- TypedArrayPrototypeGetByteOffset,
DataViewPrototypeGetBuffer,
- DataViewPrototypeGetByteLength,
- DataViewPrototypeGetByteOffset,
TypedArrayPrototypeGetBuffer,
} = primordials;
const { isTypedArray, isDataView, close } = core;
@@ -41,17 +38,9 @@ const toU8 = (input) => {
}
if (isTypedArray(input)) {
- return new Uint8Array(
- TypedArrayPrototypeGetBuffer(input),
- TypedArrayPrototypeGetByteOffset(input),
- TypedArrayPrototypeGetByteLength(input),
- );
+ return new Uint8Array(TypedArrayPrototypeGetBuffer(input));
} else if (isDataView(input)) {
- return new Uint8Array(
- DataViewPrototypeGetBuffer(input),
- DataViewPrototypeGetByteOffset(input),
- DataViewPrototypeGetByteLength(input),
- );
+ return new Uint8Array(DataViewPrototypeGetBuffer(input));
}
return input;