Format script component

This commit is contained in:
chansuke 2018-09-18 23:24:15 +09:00 committed by Josh Matthews
parent 2ca7a13473
commit c37a345dc9
357 changed files with 25485 additions and 18076 deletions

View file

@ -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) {