(value)
| 781 | // Detach internal JSON values from the current global's mutable prototypes to |
| 782 | // approximate those fresh-realm semantics without creating a new realm. |
| 783 | function detachFromUserPrototypes(value) { |
| 784 | if (value === null || typeof value !== 'object') |
| 785 | return; |
| 786 | |
| 787 | ObjectSetPrototypeOf(value, null); |
| 788 | |
| 789 | if (ArrayIsArray(value)) { |
| 790 | setOwnProperty(value, SymbolIterator, safeArrayIterator); |
| 791 | for (let n = 0; n < value.length; n++) |
| 792 | detachFromUserPrototypes(value[n]); |
| 793 | return; |
| 794 | } |
| 795 | |
| 796 | const keys = ObjectKeys(value); |
| 797 | for (let n = 0; n < keys.length; n++) |
| 798 | detachFromUserPrototypes(value[keys[n]]); |
| 799 | } |
| 800 | |
| 801 | // Parse wrapped JWK bytes according to WebCrypto's "parse a JWK" procedure. |
| 802 | function parseJwk(data) { |
no test coverage detected
searching dependent graphs…