mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement window.crypto.getRandomValues()
This commit is contained in:
parent
73b52c095a
commit
92874a89d2
14 changed files with 138 additions and 0 deletions
|
@ -62,6 +62,10 @@ pub enum Error {
|
|||
DataClone,
|
||||
/// NoModificationAllowedError DOMException
|
||||
NoModificationAllowed,
|
||||
/// QuotaExceededError DOMException
|
||||
QuotaExceeded,
|
||||
/// TypeMismatchError DOMException
|
||||
TypeMismatch,
|
||||
|
||||
/// TypeError JavaScript Error
|
||||
Type(DOMString),
|
||||
|
@ -101,6 +105,8 @@ pub fn throw_dom_exception(cx: *mut JSContext, global: GlobalRef,
|
|||
Error::InvalidNodeType => DOMErrorName::InvalidNodeTypeError,
|
||||
Error::DataClone => DOMErrorName::DataCloneError,
|
||||
Error::NoModificationAllowed => DOMErrorName::NoModificationAllowedError,
|
||||
Error::QuotaExceeded => DOMErrorName::QuotaExceededError,
|
||||
Error::TypeMismatch => DOMErrorName::TypeMismatchError,
|
||||
Error::Type(message) => {
|
||||
assert!(unsafe { JS_IsExceptionPending(cx) } == 0);
|
||||
throw_type_error(cx, &message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue