mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
Automatic update from web-platform-tests Correctly reject promise if failed to normalize algorithm We used to leave the promise returned by crypto.subtle.importKey and some other crypto methods in an unsettled state in case the method failed with unsupported algorithm, which has been caught by a recently introduced DCHECK(). This fixes the invariant, along with bringing this and other crypto methods to spec compliance: an unsupported algorithm is generally supposed to cause promise rejection rather than synchronous exception according to https://w3c.github.io/webcrypto/: > If an error occurred, return a Promise rejected with normalizedAlgorithm. Bug: 349877609 Change-Id: I72288a3fe084a2bf2ed2b30a4d01d41a4f0fa571 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5668545 Commit-Queue: Andrey Kosyakov <[email protected]> Reviewed-by: Dmitry Gozman <[email protected]> Cr-Commit-Position: refs/heads/main@{#1321728} -- wpt-commits: 82f4f7d37c29e98c90da648365a5efb96a8dddcf wpt-pr: 46946