mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Format script component
This commit is contained in:
parent
2ca7a13473
commit
c37a345dc9
357 changed files with 25485 additions and 18076 deletions
|
@ -36,17 +36,22 @@ impl Crypto {
|
|||
}
|
||||
|
||||
pub fn new(global: &GlobalScope) -> DomRoot<Crypto> {
|
||||
reflect_dom_object(Box::new(Crypto::new_inherited()), global, CryptoBinding::Wrap)
|
||||
reflect_dom_object(
|
||||
Box::new(Crypto::new_inherited()),
|
||||
global,
|
||||
CryptoBinding::Wrap,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl CryptoMethods for Crypto {
|
||||
#[allow(unsafe_code)]
|
||||
// https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#Crypto-method-getRandomValues
|
||||
unsafe fn GetRandomValues(&self,
|
||||
_cx: *mut JSContext,
|
||||
mut input: CustomAutoRooterGuard<ArrayBufferView>)
|
||||
-> Fallible<NonNull<JSObject>> {
|
||||
unsafe fn GetRandomValues(
|
||||
&self,
|
||||
_cx: *mut JSContext,
|
||||
mut input: CustomAutoRooterGuard<ArrayBufferView>,
|
||||
) -> Fallible<NonNull<JSObject>> {
|
||||
let array_type = input.get_array_type();
|
||||
|
||||
if !is_integer_buffer(array_type) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue