Closed Bug 713433 Opened 13 years ago Closed 2 years ago

window.crypto.getRandomValues does not throw specific enough exceptions

Categories

(Core :: DOM: Core & HTML, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: briansmith, Unassigned)

References

(Depends on 1 open bug, )

Details

+++ 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
Closed: 10 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.
Component: DOM → DOM: Core & HTML

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: david → nobody

The web-platform-tests changes have long since merged.

Status: REOPENED → RESOLVED
Closed: 10 years ago2 years ago
Resolution: --- → FIXED
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.