Files
servo/components/script
Kingsley Yung 91c717ccc8 script: Simplify IDL dictionary conversion in SubtleCrypto (#42655)
In `NormalizedAlgorithm::from_object_value`, we use
`dictionary_from_jsval` to convert `HandleValue` into IDL dictionary
types generated by `script_bingings`, and immediately use `From`,
`TryFrom`, `TryFromWithCx` trait implementation to convert them into
webcrypto's subtle dictionary types.

Since our webcrypto implementation doesn't directly use the dictionary
types generated by `script_bingings`, this patch combines the 2 steps of
this conversion into one step, by using `TryFromWithCx` trait
implementation for those dictionaries and moving the
`dictionary_from_jsval` calls into `try_from_with_cx`.

Testing: Refactoring. Existing tests suffice.
Fixes: Preparation for #42579

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2026-02-22 23:14:22 +00:00
..
2025-10-02 07:51:19 +00:00