From 2d578ea54abe1da94d485d5abd501143ee225b96 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Sun, 15 Aug 2021 15:30:35 +0530 Subject: [PATCH] fix(ext/crypto): fix copying buffersource (#11714) --- ext/crypto/00_crypto.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/crypto/00_crypto.js b/ext/crypto/00_crypto.js index c3107c288e..69425ae6a3 100644 --- a/ext/crypto/00_crypto.js +++ b/ext/crypto/00_crypto.js @@ -142,8 +142,8 @@ const idlValue = normalizedAlgorithm[member]; // 3. if (idlType === "BufferSource" && idlValue) { - normalizedAlgorithm[member] = new Uint8Array( - TypedArrayPrototypeSlice( + normalizedAlgorithm[member] = TypedArrayPrototypeSlice( + new Uint8Array( (ArrayBufferIsView(idlValue) ? idlValue.buffer : idlValue), idlValue.byteOffset ?? 0, idlValue.byteLength,