From 632d83270498f6cb2e9d284503d86607f250b80e Mon Sep 17 00:00:00 2001 From: Daniel Adams <70986246+msub2@users.noreply.github.com> Date: Wed, 18 Sep 2024 04:07:05 +0000 Subject: [PATCH] Add checks for BigInt/BigUint in getRandomValues (#33485) Signed-off-by: Daniel Adams --- components/script/dom/crypto.rs | 4 +- .../WebCryptoAPI/getRandomValues.any.js.ini | 49 ------------------- 2 files changed, 3 insertions(+), 50 deletions(-) diff --git a/components/script/dom/crypto.rs b/components/script/dom/crypto.rs index 75b3e88cad3..8a2fa81fd36 100644 --- a/components/script/dom/crypto.rs +++ b/components/script/dom/crypto.rs @@ -83,6 +83,8 @@ fn is_integer_buffer(array_type: Type) -> bool { Type::Uint16 | Type::Int16 | Type::Uint32 | - Type::Int32 + Type::Int32 | + Type::BigInt64 | + Type::BigUint64 ) } diff --git a/tests/wpt/meta/WebCryptoAPI/getRandomValues.any.js.ini b/tests/wpt/meta/WebCryptoAPI/getRandomValues.any.js.ini index a50fdb01eff..a53fc15fd24 100644 --- a/tests/wpt/meta/WebCryptoAPI/getRandomValues.any.js.ini +++ b/tests/wpt/meta/WebCryptoAPI/getRandomValues.any.js.ini @@ -1,56 +1,7 @@ [getRandomValues.any.worker.html] - [Integer array: BigInt64Array] - expected: FAIL - - [Large length: BigInt64Array] - expected: FAIL - - [Null arrays: BigInt64Array] - expected: FAIL - - [Integer array: BigUint64Array] - expected: FAIL - - [Large length: BigUint64Array] - expected: FAIL - - [Null arrays: BigUint64Array] - expected: FAIL - [Float16 arrays] expected: FAIL - [Subclass of BigInt64Array] - expected: FAIL - - [Subclass of BigUint64Array] - expected: FAIL - - [getRandomValues.any.html] - [Integer array: BigInt64Array] - expected: FAIL - - [Large length: BigInt64Array] - expected: FAIL - - [Null arrays: BigInt64Array] - expected: FAIL - - [Integer array: BigUint64Array] - expected: FAIL - - [Large length: BigUint64Array] - expected: FAIL - - [Null arrays: BigUint64Array] - expected: FAIL - [Float16 arrays] expected: FAIL - - [Subclass of BigInt64Array] - expected: FAIL - - [Subclass of BigUint64Array] - expected: FAIL