|
2 | 2 |
|
3 | 3 | const { |
4 | 4 | ArrayPrototypeIncludes, |
| 5 | + FunctionPrototypeCall, |
5 | 6 | JSONParse, |
6 | 7 | JSONStringify, |
7 | 8 | ObjectDefineProperties, |
@@ -84,7 +85,7 @@ async function digest(algorithm, data) { |
84 | 85 |
|
85 | 86 | algorithm = normalizeAlgorithm(algorithm, 'digest'); |
86 | 87 |
|
87 | | - return await ReflectApply(asyncDigest, this, [algorithm, data]); |
| 88 | + return await FunctionPrototypeCall(asyncDigest, this, algorithm, data); |
88 | 89 | } |
89 | 90 |
|
90 | 91 | function randomUUID() { |
@@ -377,10 +378,10 @@ async function deriveKey( |
377 | 378 | throw lazyDOMException('Unrecognized algorithm name', 'NotSupportedError'); |
378 | 379 | } |
379 | 380 |
|
380 | | - return ReflectApply( |
| 381 | + return FunctionPrototypeCall( |
381 | 382 | importKeySync, |
382 | 383 | this, |
383 | | - ['raw-secret', bits, derivedKeyAlgorithm, extractable, keyUsages], |
| 384 | + 'raw-secret', bits, derivedKeyAlgorithm, extractable, keyUsages, |
384 | 385 | ); |
385 | 386 | } |
386 | 387 |
|
@@ -889,10 +890,10 @@ async function importKey( |
889 | 890 |
|
890 | 891 | algorithm = normalizeAlgorithm(algorithm, 'importKey'); |
891 | 892 |
|
892 | | - return ReflectApply( |
| 893 | + return FunctionPrototypeCall( |
893 | 894 | importKeySync, |
894 | 895 | this, |
895 | | - [format, keyData, algorithm, extractable, keyUsages], |
| 896 | + format, keyData, algorithm, extractable, keyUsages, |
896 | 897 | ); |
897 | 898 | } |
898 | 899 |
|
@@ -926,7 +927,7 @@ async function wrapKey(format, key, wrappingKey, algorithm) { |
926 | 927 | } catch { |
927 | 928 | algorithm = normalizeAlgorithm(algorithm, 'encrypt'); |
928 | 929 | } |
929 | | - let keyData = await ReflectApply(exportKey, this, [format, key]); |
| 930 | + let keyData = await FunctionPrototypeCall(exportKey, this, format, key); |
930 | 931 |
|
931 | 932 | if (format === 'jwk') { |
932 | 933 | const ec = new TextEncoder(); |
@@ -1023,10 +1024,10 @@ async function unwrapKey( |
1023 | 1024 | } |
1024 | 1025 | } |
1025 | 1026 |
|
1026 | | - return ReflectApply( |
| 1027 | + return FunctionPrototypeCall( |
1027 | 1028 | importKeySync, |
1028 | 1029 | this, |
1029 | | - [format, keyData, unwrappedKeyAlgo, extractable, keyUsages], |
| 1030 | + format, keyData, unwrappedKeyAlgo, extractable, keyUsages, |
1030 | 1031 | ); |
1031 | 1032 | } |
1032 | 1033 |
|
@@ -1349,10 +1350,10 @@ async function encapsulateKey(encapsulationAlgorithm, encapsulationKey, sharedKe |
1349 | 1350 | throw lazyDOMException('Unrecognized algorithm name', 'NotSupportedError'); |
1350 | 1351 | } |
1351 | 1352 |
|
1352 | | - const sharedKey = ReflectApply( |
| 1353 | + const sharedKey = FunctionPrototypeCall( |
1353 | 1354 | importKeySync, |
1354 | 1355 | this, |
1355 | | - ['raw-secret', encapsulateBits.sharedKey, normalizedSharedKeyAlgorithm, extractable, usages], |
| 1356 | + 'raw-secret', encapsulateBits.sharedKey, normalizedSharedKeyAlgorithm, extractable, usages, |
1356 | 1357 | ); |
1357 | 1358 |
|
1358 | 1359 | const encapsulatedKey = { |
@@ -1469,10 +1470,10 @@ async function decapsulateKey( |
1469 | 1470 | throw lazyDOMException('Unrecognized algorithm name', 'NotSupportedError'); |
1470 | 1471 | } |
1471 | 1472 |
|
1472 | | - return ReflectApply( |
| 1473 | + return FunctionPrototypeCall( |
1473 | 1474 | importKeySync, |
1474 | 1475 | this, |
1475 | | - ['raw-secret', decapsulatedBits, normalizedSharedKeyAlgorithm, extractable, usages], |
| 1476 | + 'raw-secret', decapsulatedBits, normalizedSharedKeyAlgorithm, extractable, usages, |
1476 | 1477 | ); |
1477 | 1478 | } |
1478 | 1479 |
|
|
0 commit comments