window.crypto.getRandomValues does not throw specific enough exceptions

REOPENED
Assigned to

Status

()

Core
DOM
REOPENED
6 years ago
3 years ago

People

(Reporter: briansmith, Assigned: David Dahl)

Tracking

(Depends on: 1 bug, {dev-doc-needed})

Other Branch
dev-doc-needed
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

+++ This bug was initially created as a clone of Bug #440046 +++

window.crypto.getRandomValues throws exceptions of type DOMException instead of more specific types like QuotaExceededError, because we don't implement the WebIDL exception model yet (bug 691017).

When this change is made, the existing tests for window.crypto.getRandomValues must be updated to check for the more specific errors instead of checking for DOMException.
Bug 1030963 removed this functionality entirely.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WONTFIX
getRandomValues is part of the WebCrypto API: http://www.w3.org/TR/WebCryptoAPI/#RandomSource-method-getRandomValues.
I am not sure about the exception, I see one reference to it here at least http://mxr.mozilla.org/mozilla-central/source/dom/base/Crypto.cpp#88.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
D'oh - not paying enough attention. Thanks.
The code is correct now, we just need some test coverage. Once <https://github.com/w3c/web-platform-tests/pull/1526> gets pulled into m-c, we can probably close this.
You need to log in before you can comment on or make changes to this bug.