diff options
Diffstat (limited to 'ext/crypto/00_crypto.js')
-rw-r--r-- | ext/crypto/00_crypto.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/crypto/00_crypto.js b/ext/crypto/00_crypto.js index f56bfb6c0..044cc1f26 100644 --- a/ext/crypto/00_crypto.js +++ b/ext/crypto/00_crypto.js @@ -29,6 +29,7 @@ JSONStringify, MathCeil, ObjectAssign, + ObjectPrototypeHasOwnProperty, ObjectPrototypeIsPrototypeOf, StringPrototypeToLowerCase, StringPrototypeToUpperCase, @@ -211,6 +212,9 @@ // 5. let desiredType = undefined; for (const key in registeredAlgorithms) { + if (!ObjectPrototypeHasOwnProperty(registeredAlgorithms, key)) { + continue; + } if ( StringPrototypeToUpperCase(key) === StringPrototypeToUpperCase(algName) ) { @@ -242,6 +246,9 @@ const dict = simpleAlgorithmDictionaries[desiredType]; // 10. for (const member in dict) { + if (!ObjectPrototypeHasOwnProperty(dict, member)) { + continue; + } const idlType = dict[member]; const idlValue = normalizedAlgorithm[member]; // 3. |