[wpt-sync] Sync PR 46946 - Correctly reject promise if failed to normalize algorithm
Categories
(Core :: DOM: Web Crypto, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox130 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 46946 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/46946
Details from upstream follow.
Andrey Kosyakov <caseq@chromium.org> wrote:
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: I72288a3fe084a2bf2ed2b30a4d01d41a4f0fa571Reviewed-on: https://chromium-review.googlesource.com/5668545
WPT-Export-Revision: a505f9d98af6c998772bf843f3438322a82fd89b
Assignee | ||
Updated•24 days ago
|
Assignee | ||
Comment 1•24 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=315f499d6cf8d3251eb99f13cb18be0b97c60c9b
Assignee | ||
Comment 2•23 days ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 2 tests and 1 subtests
Status Summary
Firefox
OK
: 2
PASS
: 2
Chrome
OK
: 2
PASS
: 2
Safari
OK
: 2
PASS
: 2
Links
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3809e3c03436 [wpt PR 46946] - Correctly reject promise if failed to normalize algorithm, a=testonly
Comment 4•13 days ago
|
||
bugherder |
Description
•