1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 // check-tidy: no specs after this line 6 7 use dom::bindings::callback::ExceptionHandling; 8 use dom::bindings::codegen::Bindings::EventListenerBinding::EventListener; 9 use dom::bindings::codegen::Bindings::FunctionBinding::Function; 10 use dom::bindings::codegen::Bindings::TestBindingBinding::{self, SimpleCallback}; 11 use dom::bindings::codegen::Bindings::TestBindingBinding::{TestBindingMethods, TestDictionary}; 12 use dom::bindings::codegen::Bindings::TestBindingBinding::{TestDictionaryDefaults, TestEnum}; 13 use dom::bindings::codegen::UnionTypes; 14 use dom::bindings::codegen::UnionTypes::{BlobOrBoolean, BlobOrBlobSequence, LongOrLongSequenceSequence}; 15 use dom::bindings::codegen::UnionTypes::{BlobOrString, BlobOrUnsignedLong, EventOrString}; 16 use dom::bindings::codegen::UnionTypes::{ByteStringOrLong, ByteStringSequenceOrLongOrString}; 17 use dom::bindings::codegen::UnionTypes::{ByteStringSequenceOrLong, DocumentOrTestTypedef}; 18 use dom::bindings::codegen::UnionTypes::{EventOrUSVString, HTMLElementOrLong, LongSequenceOrTestTypedef}; 19 use dom::bindings::codegen::UnionTypes::{HTMLElementOrUnsignedLongOrStringOrBoolean, LongSequenceOrBoolean}; 20 use dom::bindings::codegen::UnionTypes::{StringOrLongSequence, StringOrStringSequence, StringSequenceOrUnsignedLong}; 21 use dom::bindings::codegen::UnionTypes::{StringOrUnsignedLong, StringOrBoolean, UnsignedLongOrBoolean}; 22 use dom::bindings::error::{Error, Fallible}; 23 use dom::bindings::mozmap::MozMap; 24 use dom::bindings::num::Finite; 25 use dom::bindings::refcounted::TrustedPromise; 26 use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object}; 27 use dom::bindings::root::DomRoot; 28 use dom::bindings::str::{ByteString, DOMString, USVString}; 29 use dom::bindings::trace::RootedTraceableBox; 30 use dom::bindings::weakref::MutableWeakRef; 31 use dom::blob::{Blob, BlobImpl}; 32 use dom::globalscope::GlobalScope; 33 use dom::promise::Promise; 34 use dom::promisenativehandler::{PromiseNativeHandler, Callback}; 35 use dom::url::URL; 36 use dom_struct::dom_struct; 37 use js::jsapi::{HandleObject, HandleValue, Heap, JSContext, JSObject}; 38 use js::jsapi::{JS_NewPlainObject, JS_NewUint8ClampedArray}; 39 use js::jsval::{JSVal, NullValue}; 40 use js::rust::CustomAutoRooterGuard; 41 use script_traits::MsDuration; 42 use servo_config::prefs::PREFS; 43 use std::borrow::ToOwned; 44 use std::ptr; 45 use std::ptr::NonNull; 46 use std::rc::Rc; 47 use timers::OneshotTimerCallback; 48 49 #[dom_struct] 50 pub struct TestBinding { 51 reflector_: Reflector, 52 url: MutableWeakRef<URL>, 53 } 54 55 impl TestBinding { new_inherited() -> TestBinding56 fn new_inherited() -> TestBinding { 57 TestBinding { 58 reflector_: Reflector::new(), 59 url: MutableWeakRef::new(None), 60 } 61 } 62 new(global: &GlobalScope) -> DomRoot<TestBinding>63 pub fn new(global: &GlobalScope) -> DomRoot<TestBinding> { 64 reflect_dom_object(Box::new(TestBinding::new_inherited()), 65 global, TestBindingBinding::Wrap) 66 } 67 Constructor(global: &GlobalScope) -> Fallible<DomRoot<TestBinding>>68 pub fn Constructor(global: &GlobalScope) -> Fallible<DomRoot<TestBinding>> { 69 Ok(TestBinding::new(global)) 70 } 71 72 #[allow(unused_variables)] Constructor_(global: &GlobalScope, nums: Vec<f64>) -> Fallible<DomRoot<TestBinding>>73 pub fn Constructor_(global: &GlobalScope, nums: Vec<f64>) -> Fallible<DomRoot<TestBinding>> { 74 Ok(TestBinding::new(global)) 75 } 76 77 #[allow(unused_variables)] Constructor__(global: &GlobalScope, num: f64) -> Fallible<DomRoot<TestBinding>>78 pub fn Constructor__(global: &GlobalScope, num: f64) -> Fallible<DomRoot<TestBinding>> { 79 Ok(TestBinding::new(global)) 80 } 81 } 82 83 impl TestBindingMethods for TestBinding { BooleanAttribute(&self) -> bool84 fn BooleanAttribute(&self) -> bool { false } SetBooleanAttribute(&self, _: bool)85 fn SetBooleanAttribute(&self, _: bool) {} ByteAttribute(&self) -> i886 fn ByteAttribute(&self) -> i8 { 0 } SetByteAttribute(&self, _: i8)87 fn SetByteAttribute(&self, _: i8) {} OctetAttribute(&self) -> u888 fn OctetAttribute(&self) -> u8 { 0 } SetOctetAttribute(&self, _: u8)89 fn SetOctetAttribute(&self, _: u8) {} ShortAttribute(&self) -> i1690 fn ShortAttribute(&self) -> i16 { 0 } SetShortAttribute(&self, _: i16)91 fn SetShortAttribute(&self, _: i16) {} UnsignedShortAttribute(&self) -> u1692 fn UnsignedShortAttribute(&self) -> u16 { 0 } SetUnsignedShortAttribute(&self, _: u16)93 fn SetUnsignedShortAttribute(&self, _: u16) {} LongAttribute(&self) -> i3294 fn LongAttribute(&self) -> i32 { 0 } SetLongAttribute(&self, _: i32)95 fn SetLongAttribute(&self, _: i32) {} UnsignedLongAttribute(&self) -> u3296 fn UnsignedLongAttribute(&self) -> u32 { 0 } SetUnsignedLongAttribute(&self, _: u32)97 fn SetUnsignedLongAttribute(&self, _: u32) {} LongLongAttribute(&self) -> i6498 fn LongLongAttribute(&self) -> i64 { 0 } SetLongLongAttribute(&self, _: i64)99 fn SetLongLongAttribute(&self, _: i64) {} UnsignedLongLongAttribute(&self) -> u64100 fn UnsignedLongLongAttribute(&self) -> u64 { 0 } SetUnsignedLongLongAttribute(&self, _: u64)101 fn SetUnsignedLongLongAttribute(&self, _: u64) {} UnrestrictedFloatAttribute(&self) -> f32102 fn UnrestrictedFloatAttribute(&self) -> f32 { 0. } SetUnrestrictedFloatAttribute(&self, _: f32)103 fn SetUnrestrictedFloatAttribute(&self, _: f32) {} FloatAttribute(&self) -> Finite<f32>104 fn FloatAttribute(&self) -> Finite<f32> { Finite::wrap(0.) } SetFloatAttribute(&self, _: Finite<f32>)105 fn SetFloatAttribute(&self, _: Finite<f32>) {} UnrestrictedDoubleAttribute(&self) -> f64106 fn UnrestrictedDoubleAttribute(&self) -> f64 { 0. } SetUnrestrictedDoubleAttribute(&self, _: f64)107 fn SetUnrestrictedDoubleAttribute(&self, _: f64) {} DoubleAttribute(&self) -> Finite<f64>108 fn DoubleAttribute(&self) -> Finite<f64> { Finite::wrap(0.) } SetDoubleAttribute(&self, _: Finite<f64>)109 fn SetDoubleAttribute(&self, _: Finite<f64>) {} StringAttribute(&self) -> DOMString110 fn StringAttribute(&self) -> DOMString { DOMString::new() } SetStringAttribute(&self, _: DOMString)111 fn SetStringAttribute(&self, _: DOMString) {} UsvstringAttribute(&self) -> USVString112 fn UsvstringAttribute(&self) -> USVString { USVString("".to_owned()) } SetUsvstringAttribute(&self, _: USVString)113 fn SetUsvstringAttribute(&self, _: USVString) {} ByteStringAttribute(&self) -> ByteString114 fn ByteStringAttribute(&self) -> ByteString { ByteString::new(vec!()) } SetByteStringAttribute(&self, _: ByteString)115 fn SetByteStringAttribute(&self, _: ByteString) {} EnumAttribute(&self) -> TestEnum116 fn EnumAttribute(&self) -> TestEnum { TestEnum::_empty } SetEnumAttribute(&self, _: TestEnum)117 fn SetEnumAttribute(&self, _: TestEnum) {} InterfaceAttribute(&self) -> DomRoot<Blob>118 fn InterfaceAttribute(&self) -> DomRoot<Blob> { 119 Blob::new(&self.global(), BlobImpl::new_from_bytes(vec![]), "".to_owned()) 120 } SetInterfaceAttribute(&self, _: &Blob)121 fn SetInterfaceAttribute(&self, _: &Blob) {} UnionAttribute(&self) -> HTMLElementOrLong122 fn UnionAttribute(&self) -> HTMLElementOrLong { HTMLElementOrLong::Long(0) } SetUnionAttribute(&self, _: HTMLElementOrLong)123 fn SetUnionAttribute(&self, _: HTMLElementOrLong) {} Union2Attribute(&self) -> EventOrString124 fn Union2Attribute(&self) -> EventOrString { EventOrString::String(DOMString::new()) } SetUnion2Attribute(&self, _: EventOrString)125 fn SetUnion2Attribute(&self, _: EventOrString) {} Union3Attribute(&self) -> EventOrUSVString126 fn Union3Attribute(&self) -> EventOrUSVString { 127 EventOrUSVString::USVString(USVString("".to_owned())) 128 } SetUnion3Attribute(&self, _: EventOrUSVString)129 fn SetUnion3Attribute(&self, _: EventOrUSVString) {} Union4Attribute(&self) -> StringOrUnsignedLong130 fn Union4Attribute(&self) -> StringOrUnsignedLong { 131 StringOrUnsignedLong::UnsignedLong(0u32) 132 } SetUnion4Attribute(&self, _: StringOrUnsignedLong)133 fn SetUnion4Attribute(&self, _: StringOrUnsignedLong) {} Union5Attribute(&self) -> StringOrBoolean134 fn Union5Attribute(&self) -> StringOrBoolean { 135 StringOrBoolean::Boolean(true) 136 } SetUnion5Attribute(&self, _: StringOrBoolean)137 fn SetUnion5Attribute(&self, _: StringOrBoolean) {} Union6Attribute(&self) -> UnsignedLongOrBoolean138 fn Union6Attribute(&self) -> UnsignedLongOrBoolean { 139 UnsignedLongOrBoolean::Boolean(true) 140 } SetUnion6Attribute(&self, _: UnsignedLongOrBoolean)141 fn SetUnion6Attribute(&self, _: UnsignedLongOrBoolean) {} Union7Attribute(&self) -> BlobOrBoolean142 fn Union7Attribute(&self) -> BlobOrBoolean { 143 BlobOrBoolean::Boolean(true) 144 } SetUnion7Attribute(&self, _: BlobOrBoolean)145 fn SetUnion7Attribute(&self, _: BlobOrBoolean) {} Union8Attribute(&self) -> BlobOrUnsignedLong146 fn Union8Attribute(&self) -> BlobOrUnsignedLong { 147 BlobOrUnsignedLong::UnsignedLong(0u32) 148 } SetUnion8Attribute(&self, _: BlobOrUnsignedLong)149 fn SetUnion8Attribute(&self, _: BlobOrUnsignedLong) {} Union9Attribute(&self) -> ByteStringOrLong150 fn Union9Attribute(&self) -> ByteStringOrLong { 151 ByteStringOrLong::ByteString(ByteString::new(vec!())) 152 } SetUnion9Attribute(&self, _: ByteStringOrLong)153 fn SetUnion9Attribute(&self, _: ByteStringOrLong) {} 154 #[allow(unsafe_code)] ArrayAttribute(&self, cx: *mut JSContext) -> NonNull<JSObject>155 unsafe fn ArrayAttribute(&self, cx: *mut JSContext) -> NonNull<JSObject> { 156 rooted!(in(cx) let array = JS_NewUint8ClampedArray(cx, 16)); 157 NonNull::new(array.get()).expect("got a null pointer") 158 } 159 #[allow(unsafe_code)] AnyAttribute(&self, _: *mut JSContext) -> JSVal160 unsafe fn AnyAttribute(&self, _: *mut JSContext) -> JSVal { NullValue() } 161 #[allow(unsafe_code)] SetAnyAttribute(&self, _: *mut JSContext, _: HandleValue)162 unsafe fn SetAnyAttribute(&self, _: *mut JSContext, _: HandleValue) {} 163 #[allow(unsafe_code)] ObjectAttribute(&self, cx: *mut JSContext) -> NonNull<JSObject>164 unsafe fn ObjectAttribute(&self, cx: *mut JSContext) -> NonNull<JSObject> { 165 rooted!(in(cx) let obj = JS_NewPlainObject(cx)); 166 NonNull::new(obj.get()).expect("got a null pointer") 167 } 168 #[allow(unsafe_code)] SetObjectAttribute(&self, _: *mut JSContext, _: *mut JSObject)169 unsafe fn SetObjectAttribute(&self, _: *mut JSContext, _: *mut JSObject) {} 170 GetBooleanAttributeNullable(&self) -> Option<bool>171 fn GetBooleanAttributeNullable(&self) -> Option<bool> { Some(false) } SetBooleanAttributeNullable(&self, _: Option<bool>)172 fn SetBooleanAttributeNullable(&self, _: Option<bool>) {} GetByteAttributeNullable(&self) -> Option<i8>173 fn GetByteAttributeNullable(&self) -> Option<i8> { Some(0) } SetByteAttributeNullable(&self, _: Option<i8>)174 fn SetByteAttributeNullable(&self, _: Option<i8>) {} GetOctetAttributeNullable(&self) -> Option<u8>175 fn GetOctetAttributeNullable(&self) -> Option<u8> { Some(0) } SetOctetAttributeNullable(&self, _: Option<u8>)176 fn SetOctetAttributeNullable(&self, _: Option<u8>) {} GetShortAttributeNullable(&self) -> Option<i16>177 fn GetShortAttributeNullable(&self) -> Option<i16> { Some(0) } SetShortAttributeNullable(&self, _: Option<i16>)178 fn SetShortAttributeNullable(&self, _: Option<i16>) {} GetUnsignedShortAttributeNullable(&self) -> Option<u16>179 fn GetUnsignedShortAttributeNullable(&self) -> Option<u16> { Some(0) } SetUnsignedShortAttributeNullable(&self, _: Option<u16>)180 fn SetUnsignedShortAttributeNullable(&self, _: Option<u16>) {} GetLongAttributeNullable(&self) -> Option<i32>181 fn GetLongAttributeNullable(&self) -> Option<i32> { Some(0) } SetLongAttributeNullable(&self, _: Option<i32>)182 fn SetLongAttributeNullable(&self, _: Option<i32>) {} GetUnsignedLongAttributeNullable(&self) -> Option<u32>183 fn GetUnsignedLongAttributeNullable(&self) -> Option<u32> { Some(0) } SetUnsignedLongAttributeNullable(&self, _: Option<u32>)184 fn SetUnsignedLongAttributeNullable(&self, _: Option<u32>) {} GetLongLongAttributeNullable(&self) -> Option<i64>185 fn GetLongLongAttributeNullable(&self) -> Option<i64> { Some(0) } SetLongLongAttributeNullable(&self, _: Option<i64>)186 fn SetLongLongAttributeNullable(&self, _: Option<i64>) {} GetUnsignedLongLongAttributeNullable(&self) -> Option<u64>187 fn GetUnsignedLongLongAttributeNullable(&self) -> Option<u64> { Some(0) } SetUnsignedLongLongAttributeNullable(&self, _: Option<u64>)188 fn SetUnsignedLongLongAttributeNullable(&self, _: Option<u64>) {} GetUnrestrictedFloatAttributeNullable(&self) -> Option<f32>189 fn GetUnrestrictedFloatAttributeNullable(&self) -> Option<f32> { Some(0.) } SetUnrestrictedFloatAttributeNullable(&self, _: Option<f32>)190 fn SetUnrestrictedFloatAttributeNullable(&self, _: Option<f32>) {} GetFloatAttributeNullable(&self) -> Option<Finite<f32>>191 fn GetFloatAttributeNullable(&self) -> Option<Finite<f32>> { Some(Finite::wrap(0.)) } SetFloatAttributeNullable(&self, _: Option<Finite<f32>>)192 fn SetFloatAttributeNullable(&self, _: Option<Finite<f32>>) {} GetUnrestrictedDoubleAttributeNullable(&self) -> Option<f64>193 fn GetUnrestrictedDoubleAttributeNullable(&self) -> Option<f64> { Some(0.) } SetUnrestrictedDoubleAttributeNullable(&self, _: Option<f64>)194 fn SetUnrestrictedDoubleAttributeNullable(&self, _: Option<f64>) {} GetDoubleAttributeNullable(&self) -> Option<Finite<f64>>195 fn GetDoubleAttributeNullable(&self) -> Option<Finite<f64>> { Some(Finite::wrap(0.)) } SetDoubleAttributeNullable(&self, _: Option<Finite<f64>>)196 fn SetDoubleAttributeNullable(&self, _: Option<Finite<f64>>) {} GetByteStringAttributeNullable(&self) -> Option<ByteString>197 fn GetByteStringAttributeNullable(&self) -> Option<ByteString> { Some(ByteString::new(vec!())) } SetByteStringAttributeNullable(&self, _: Option<ByteString>)198 fn SetByteStringAttributeNullable(&self, _: Option<ByteString>) {} GetStringAttributeNullable(&self) -> Option<DOMString>199 fn GetStringAttributeNullable(&self) -> Option<DOMString> { Some(DOMString::new()) } SetStringAttributeNullable(&self, _: Option<DOMString>)200 fn SetStringAttributeNullable(&self, _: Option<DOMString>) {} GetUsvstringAttributeNullable(&self) -> Option<USVString>201 fn GetUsvstringAttributeNullable(&self) -> Option<USVString> { Some(USVString("".to_owned())) } SetUsvstringAttributeNullable(&self, _: Option<USVString>)202 fn SetUsvstringAttributeNullable(&self, _: Option<USVString>) {} SetBinaryRenamedAttribute(&self, _: DOMString)203 fn SetBinaryRenamedAttribute(&self, _: DOMString) {} ForwardedAttribute(&self) -> DomRoot<TestBinding>204 fn ForwardedAttribute(&self) -> DomRoot<TestBinding> { DomRoot::from_ref(self) } BinaryRenamedAttribute(&self) -> DOMString205 fn BinaryRenamedAttribute(&self) -> DOMString { DOMString::new() } SetBinaryRenamedAttribute2(&self, _: DOMString)206 fn SetBinaryRenamedAttribute2(&self, _: DOMString) {} BinaryRenamedAttribute2(&self) -> DOMString207 fn BinaryRenamedAttribute2(&self) -> DOMString { DOMString::new() } Attr_to_automatically_rename(&self) -> DOMString208 fn Attr_to_automatically_rename(&self) -> DOMString { DOMString::new() } SetAttr_to_automatically_rename(&self, _: DOMString)209 fn SetAttr_to_automatically_rename(&self, _: DOMString) {} GetEnumAttributeNullable(&self) -> Option<TestEnum>210 fn GetEnumAttributeNullable(&self) -> Option<TestEnum> { Some(TestEnum::_empty) } GetInterfaceAttributeNullable(&self) -> Option<DomRoot<Blob>>211 fn GetInterfaceAttributeNullable(&self) -> Option<DomRoot<Blob>> { 212 Some(Blob::new(&self.global(), BlobImpl::new_from_bytes(vec![]), "".to_owned())) 213 } SetInterfaceAttributeNullable(&self, _: Option<&Blob>)214 fn SetInterfaceAttributeNullable(&self, _: Option<&Blob>) {} GetInterfaceAttributeWeak(&self) -> Option<DomRoot<URL>>215 fn GetInterfaceAttributeWeak(&self) -> Option<DomRoot<URL>> { 216 self.url.root() 217 } SetInterfaceAttributeWeak(&self, url: Option<&URL>)218 fn SetInterfaceAttributeWeak(&self, url: Option<&URL>) { 219 self.url.set(url); 220 } 221 #[allow(unsafe_code)] GetObjectAttributeNullable(&self, _: *mut JSContext) -> Option<NonNull<JSObject>>222 unsafe fn GetObjectAttributeNullable(&self, _: *mut JSContext) -> Option<NonNull<JSObject>> { None } 223 #[allow(unsafe_code)] SetObjectAttributeNullable(&self, _: *mut JSContext, _: *mut JSObject)224 unsafe fn SetObjectAttributeNullable(&self, _: *mut JSContext, _: *mut JSObject) {} GetUnionAttributeNullable(&self) -> Option<HTMLElementOrLong>225 fn GetUnionAttributeNullable(&self) -> Option<HTMLElementOrLong> { 226 Some(HTMLElementOrLong::Long(0)) 227 } SetUnionAttributeNullable(&self, _: Option<HTMLElementOrLong>)228 fn SetUnionAttributeNullable(&self, _: Option<HTMLElementOrLong>) {} GetUnion2AttributeNullable(&self) -> Option<EventOrString>229 fn GetUnion2AttributeNullable(&self) -> Option<EventOrString> { 230 Some(EventOrString::String(DOMString::new())) 231 } SetUnion2AttributeNullable(&self, _: Option<EventOrString>)232 fn SetUnion2AttributeNullable(&self, _: Option<EventOrString>) {} GetUnion3AttributeNullable(&self) -> Option<BlobOrBoolean>233 fn GetUnion3AttributeNullable(&self) -> Option<BlobOrBoolean> { 234 Some(BlobOrBoolean::Boolean(true)) 235 } SetUnion3AttributeNullable(&self, _: Option<BlobOrBoolean>)236 fn SetUnion3AttributeNullable(&self, _: Option<BlobOrBoolean>) {} GetUnion4AttributeNullable(&self) -> Option<UnsignedLongOrBoolean>237 fn GetUnion4AttributeNullable(&self) -> Option<UnsignedLongOrBoolean> { 238 Some(UnsignedLongOrBoolean::Boolean(true)) 239 } SetUnion4AttributeNullable(&self, _: Option<UnsignedLongOrBoolean>)240 fn SetUnion4AttributeNullable(&self, _: Option<UnsignedLongOrBoolean>) {} GetUnion5AttributeNullable(&self) -> Option<StringOrBoolean>241 fn GetUnion5AttributeNullable(&self) -> Option<StringOrBoolean> { 242 Some(StringOrBoolean::Boolean(true)) 243 } SetUnion5AttributeNullable(&self, _: Option<StringOrBoolean>)244 fn SetUnion5AttributeNullable(&self, _: Option<StringOrBoolean>) {} GetUnion6AttributeNullable(&self) -> Option<ByteStringOrLong>245 fn GetUnion6AttributeNullable(&self) -> Option<ByteStringOrLong> { 246 Some(ByteStringOrLong::ByteString(ByteString::new(vec!()))) 247 } SetUnion6AttributeNullable(&self, _: Option<ByteStringOrLong>)248 fn SetUnion6AttributeNullable(&self, _: Option<ByteStringOrLong>) {} BinaryRenamedMethod(&self)249 fn BinaryRenamedMethod(&self) {} ReceiveVoid(&self)250 fn ReceiveVoid(&self) {} ReceiveBoolean(&self) -> bool251 fn ReceiveBoolean(&self) -> bool { false } ReceiveByte(&self) -> i8252 fn ReceiveByte(&self) -> i8 { 0 } ReceiveOctet(&self) -> u8253 fn ReceiveOctet(&self) -> u8 { 0 } ReceiveShort(&self) -> i16254 fn ReceiveShort(&self) -> i16 { 0 } ReceiveUnsignedShort(&self) -> u16255 fn ReceiveUnsignedShort(&self) -> u16 { 0 } ReceiveLong(&self) -> i32256 fn ReceiveLong(&self) -> i32 { 0 } ReceiveUnsignedLong(&self) -> u32257 fn ReceiveUnsignedLong(&self) -> u32 { 0 } ReceiveLongLong(&self) -> i64258 fn ReceiveLongLong(&self) -> i64 { 0 } ReceiveUnsignedLongLong(&self) -> u64259 fn ReceiveUnsignedLongLong(&self) -> u64 { 0 } ReceiveUnrestrictedFloat(&self) -> f32260 fn ReceiveUnrestrictedFloat(&self) -> f32 { 0. } ReceiveFloat(&self) -> Finite<f32>261 fn ReceiveFloat(&self) -> Finite<f32> { Finite::wrap(0.) } ReceiveUnrestrictedDouble(&self) -> f64262 fn ReceiveUnrestrictedDouble(&self) -> f64 { 0. } ReceiveDouble(&self) -> Finite<f64>263 fn ReceiveDouble(&self) -> Finite<f64> { Finite::wrap(0.) } ReceiveString(&self) -> DOMString264 fn ReceiveString(&self) -> DOMString { DOMString::new() } ReceiveUsvstring(&self) -> USVString265 fn ReceiveUsvstring(&self) -> USVString { USVString("".to_owned()) } ReceiveByteString(&self) -> ByteString266 fn ReceiveByteString(&self) -> ByteString { ByteString::new(vec!()) } ReceiveEnum(&self) -> TestEnum267 fn ReceiveEnum(&self) -> TestEnum { TestEnum::_empty } ReceiveInterface(&self) -> DomRoot<Blob>268 fn ReceiveInterface(&self) -> DomRoot<Blob> { 269 Blob::new(&self.global(), BlobImpl::new_from_bytes(vec![]), "".to_owned()) 270 } 271 #[allow(unsafe_code)] ReceiveAny(&self, _: *mut JSContext) -> JSVal272 unsafe fn ReceiveAny(&self, _: *mut JSContext) -> JSVal { NullValue() } 273 #[allow(unsafe_code)] ReceiveObject(&self, cx: *mut JSContext) -> NonNull<JSObject>274 unsafe fn ReceiveObject(&self, cx: *mut JSContext) -> NonNull<JSObject> { 275 self.ObjectAttribute(cx) 276 } ReceiveUnion(&self) -> HTMLElementOrLong277 fn ReceiveUnion(&self) -> HTMLElementOrLong { HTMLElementOrLong::Long(0) } ReceiveUnion2(&self) -> EventOrString278 fn ReceiveUnion2(&self) -> EventOrString { EventOrString::String(DOMString::new()) } ReceiveUnion3(&self) -> StringOrLongSequence279 fn ReceiveUnion3(&self) -> StringOrLongSequence { StringOrLongSequence::LongSequence(vec![]) } ReceiveUnion4(&self) -> StringOrStringSequence280 fn ReceiveUnion4(&self) -> StringOrStringSequence { StringOrStringSequence::StringSequence(vec![]) } ReceiveUnion5(&self) -> BlobOrBlobSequence281 fn ReceiveUnion5(&self) -> BlobOrBlobSequence { BlobOrBlobSequence::BlobSequence(vec![]) } ReceiveUnion6(&self) -> StringOrUnsignedLong282 fn ReceiveUnion6(&self) -> StringOrUnsignedLong { StringOrUnsignedLong::String(DOMString::new()) } ReceiveUnion7(&self) -> StringOrBoolean283 fn ReceiveUnion7(&self) -> StringOrBoolean { StringOrBoolean::Boolean(true) } ReceiveUnion8(&self) -> UnsignedLongOrBoolean284 fn ReceiveUnion8(&self) -> UnsignedLongOrBoolean { UnsignedLongOrBoolean::UnsignedLong(0u32) } ReceiveUnion9(&self) -> HTMLElementOrUnsignedLongOrStringOrBoolean285 fn ReceiveUnion9(&self) -> HTMLElementOrUnsignedLongOrStringOrBoolean { 286 HTMLElementOrUnsignedLongOrStringOrBoolean::Boolean(true) 287 } ReceiveUnion10(&self) -> ByteStringOrLong288 fn ReceiveUnion10(&self) -> ByteStringOrLong { ByteStringOrLong::ByteString(ByteString::new(vec!())) } ReceiveUnion11(&self) -> ByteStringSequenceOrLongOrString289 fn ReceiveUnion11(&self) -> ByteStringSequenceOrLongOrString { 290 ByteStringSequenceOrLongOrString::ByteStringSequence(vec!(ByteString::new(vec!()))) 291 } ReceiveSequence(&self) -> Vec<i32>292 fn ReceiveSequence(&self) -> Vec<i32> { vec![1] } ReceiveInterfaceSequence(&self) -> Vec<DomRoot<Blob>>293 fn ReceiveInterfaceSequence(&self) -> Vec<DomRoot<Blob>> { 294 vec![Blob::new(&self.global(), BlobImpl::new_from_bytes(vec![]), "".to_owned())] 295 } 296 ReceiveNullableBoolean(&self) -> Option<bool>297 fn ReceiveNullableBoolean(&self) -> Option<bool> { Some(false) } ReceiveNullableByte(&self) -> Option<i8>298 fn ReceiveNullableByte(&self) -> Option<i8> { Some(0) } ReceiveNullableOctet(&self) -> Option<u8>299 fn ReceiveNullableOctet(&self) -> Option<u8> { Some(0) } ReceiveNullableShort(&self) -> Option<i16>300 fn ReceiveNullableShort(&self) -> Option<i16> { Some(0) } ReceiveNullableUnsignedShort(&self) -> Option<u16>301 fn ReceiveNullableUnsignedShort(&self) -> Option<u16> { Some(0) } ReceiveNullableLong(&self) -> Option<i32>302 fn ReceiveNullableLong(&self) -> Option<i32> { Some(0) } ReceiveNullableUnsignedLong(&self) -> Option<u32>303 fn ReceiveNullableUnsignedLong(&self) -> Option<u32> { Some(0) } ReceiveNullableLongLong(&self) -> Option<i64>304 fn ReceiveNullableLongLong(&self) -> Option<i64> { Some(0) } ReceiveNullableUnsignedLongLong(&self) -> Option<u64>305 fn ReceiveNullableUnsignedLongLong(&self) -> Option<u64> { Some(0) } ReceiveNullableUnrestrictedFloat(&self) -> Option<f32>306 fn ReceiveNullableUnrestrictedFloat(&self) -> Option<f32> { Some(0.) } ReceiveNullableFloat(&self) -> Option<Finite<f32>>307 fn ReceiveNullableFloat(&self) -> Option<Finite<f32>> { Some(Finite::wrap(0.)) } ReceiveNullableUnrestrictedDouble(&self) -> Option<f64>308 fn ReceiveNullableUnrestrictedDouble(&self) -> Option<f64> { Some(0.) } ReceiveNullableDouble(&self) -> Option<Finite<f64>>309 fn ReceiveNullableDouble(&self) -> Option<Finite<f64>> { Some(Finite::wrap(0.)) } ReceiveNullableString(&self) -> Option<DOMString>310 fn ReceiveNullableString(&self) -> Option<DOMString> { Some(DOMString::new()) } ReceiveNullableUsvstring(&self) -> Option<USVString>311 fn ReceiveNullableUsvstring(&self) -> Option<USVString> { Some(USVString("".to_owned())) } ReceiveNullableByteString(&self) -> Option<ByteString>312 fn ReceiveNullableByteString(&self) -> Option<ByteString> { Some(ByteString::new(vec!())) } ReceiveNullableEnum(&self) -> Option<TestEnum>313 fn ReceiveNullableEnum(&self) -> Option<TestEnum> { Some(TestEnum::_empty) } ReceiveNullableInterface(&self) -> Option<DomRoot<Blob>>314 fn ReceiveNullableInterface(&self) -> Option<DomRoot<Blob>> { 315 Some(Blob::new(&self.global(), BlobImpl::new_from_bytes(vec![]), "".to_owned())) 316 } 317 #[allow(unsafe_code)] ReceiveNullableObject(&self, cx: *mut JSContext) -> Option<NonNull<JSObject>>318 unsafe fn ReceiveNullableObject(&self, cx: *mut JSContext) -> Option<NonNull<JSObject>> { 319 self.GetObjectAttributeNullable(cx) 320 } ReceiveNullableUnion(&self) -> Option<HTMLElementOrLong>321 fn ReceiveNullableUnion(&self) -> Option<HTMLElementOrLong> { 322 Some(HTMLElementOrLong::Long(0)) 323 } ReceiveNullableUnion2(&self) -> Option<EventOrString>324 fn ReceiveNullableUnion2(&self) -> Option<EventOrString> { 325 Some(EventOrString::String(DOMString::new())) 326 } ReceiveNullableUnion3(&self) -> Option<StringOrLongSequence>327 fn ReceiveNullableUnion3(&self) -> Option<StringOrLongSequence> { 328 Some(StringOrLongSequence::String(DOMString::new())) 329 } ReceiveNullableUnion4(&self) -> Option<LongSequenceOrBoolean>330 fn ReceiveNullableUnion4(&self) -> Option<LongSequenceOrBoolean> { 331 Some(LongSequenceOrBoolean::Boolean(true)) 332 } ReceiveNullableUnion5(&self) -> Option<UnsignedLongOrBoolean>333 fn ReceiveNullableUnion5(&self) -> Option<UnsignedLongOrBoolean> { 334 Some(UnsignedLongOrBoolean::UnsignedLong(0u32)) 335 } ReceiveNullableUnion6(&self) -> Option<ByteStringOrLong>336 fn ReceiveNullableUnion6(&self) -> Option<ByteStringOrLong> { 337 Some(ByteStringOrLong::ByteString(ByteString::new(vec!()))) 338 } ReceiveNullableSequence(&self) -> Option<Vec<i32>>339 fn ReceiveNullableSequence(&self) -> Option<Vec<i32>> { Some(vec![1]) } ReceiveTestDictionaryWithSuccessOnKeyword(&self) -> RootedTraceableBox<TestDictionary>340 fn ReceiveTestDictionaryWithSuccessOnKeyword(&self) -> RootedTraceableBox<TestDictionary> { 341 RootedTraceableBox::new(TestDictionary { 342 anyValue: Heap::default(), 343 booleanValue: None, 344 byteValue: None, 345 dict: RootedTraceableBox::new(TestDictionaryDefaults { 346 UnrestrictedDoubleValue: 0.0, 347 anyValue: Heap::default(), 348 booleanValue: false, 349 bytestringValue: ByteString::new(vec![]), 350 byteValue: 0, 351 doubleValue: Finite::new(1.0).unwrap(), 352 enumValue: TestEnum::Foo, 353 floatValue: Finite::new(1.0).unwrap(), 354 longLongValue: 54, 355 longValue: 12, 356 nullableBooleanValue: None, 357 nullableBytestringValue: None, 358 nullableByteValue: None, 359 nullableDoubleValue: None, 360 nullableFloatValue: None, 361 nullableLongLongValue: None, 362 nullableLongValue: None, 363 nullableObjectValue: Heap::default(), 364 nullableOctetValue: None, 365 nullableShortValue: None, 366 nullableStringValue: None, 367 nullableUnrestrictedDoubleValue: None, 368 nullableUnrestrictedFloatValue: None, 369 nullableUnsignedLongLongValue: None, 370 nullableUnsignedLongValue: None, 371 nullableUnsignedShortValue: None, 372 nullableUsvstringValue: None, 373 octetValue: 0, 374 shortValue: 0, 375 stringValue: DOMString::new(), 376 unrestrictedFloatValue: 0.0, 377 unsignedLongLongValue: 0, 378 unsignedLongValue: 0, 379 unsignedShortValue: 0, 380 usvstringValue: USVString("".to_owned()), 381 }), 382 doubleValue: None, 383 enumValue: None, 384 floatValue: None, 385 interfaceValue: None, 386 longLongValue: None, 387 longValue: None, 388 objectValue: None, 389 octetValue: None, 390 requiredValue: true, 391 seqDict: None, 392 elementSequence: None, 393 shortValue: None, 394 stringValue: None, 395 type_: Some(DOMString::from("success")), 396 unrestrictedDoubleValue: None, 397 unrestrictedFloatValue: None, 398 unsignedLongLongValue: None, 399 unsignedLongValue: None, 400 unsignedShortValue: None, 401 usvstringValue: None, 402 nonRequiredNullable: None, 403 nonRequiredNullable2: Some(None), // null 404 }) 405 } 406 DictMatchesPassedValues(&self, arg: RootedTraceableBox<TestDictionary>) -> bool407 fn DictMatchesPassedValues(&self, arg: RootedTraceableBox<TestDictionary>) -> bool { 408 arg.type_.as_ref().map(|s| s == "success").unwrap_or(false) && 409 arg.nonRequiredNullable.is_none() && 410 arg.nonRequiredNullable2 == Some(None) 411 } 412 PassBoolean(&self, _: bool)413 fn PassBoolean(&self, _: bool) {} PassByte(&self, _: i8)414 fn PassByte(&self, _: i8) {} PassOctet(&self, _: u8)415 fn PassOctet(&self, _: u8) {} PassShort(&self, _: i16)416 fn PassShort(&self, _: i16) {} PassUnsignedShort(&self, _: u16)417 fn PassUnsignedShort(&self, _: u16) {} PassLong(&self, _: i32)418 fn PassLong(&self, _: i32) {} PassUnsignedLong(&self, _: u32)419 fn PassUnsignedLong(&self, _: u32) {} PassLongLong(&self, _: i64)420 fn PassLongLong(&self, _: i64) {} PassUnsignedLongLong(&self, _: u64)421 fn PassUnsignedLongLong(&self, _: u64) {} PassUnrestrictedFloat(&self, _: f32)422 fn PassUnrestrictedFloat(&self, _: f32) {} PassFloat(&self, _: Finite<f32>)423 fn PassFloat(&self, _: Finite<f32>) {} PassUnrestrictedDouble(&self, _: f64)424 fn PassUnrestrictedDouble(&self, _: f64) {} PassDouble(&self, _: Finite<f64>)425 fn PassDouble(&self, _: Finite<f64>) {} PassString(&self, _: DOMString)426 fn PassString(&self, _: DOMString) {} PassUsvstring(&self, _: USVString)427 fn PassUsvstring(&self, _: USVString) {} PassByteString(&self, _: ByteString)428 fn PassByteString(&self, _: ByteString) {} PassEnum(&self, _: TestEnum)429 fn PassEnum(&self, _: TestEnum) {} PassInterface(&self, _: &Blob)430 fn PassInterface(&self, _: &Blob) {} PassUnion(&self, _: HTMLElementOrLong)431 fn PassUnion(&self, _: HTMLElementOrLong) {} PassUnion2(&self, _: EventOrString)432 fn PassUnion2(&self, _: EventOrString) {} PassUnion3(&self, _: BlobOrString)433 fn PassUnion3(&self, _: BlobOrString) {} PassUnion4(&self, _: StringOrStringSequence)434 fn PassUnion4(&self, _: StringOrStringSequence) {} PassUnion5(&self, _: StringOrBoolean)435 fn PassUnion5(&self, _: StringOrBoolean) {} PassUnion6(&self, _: UnsignedLongOrBoolean)436 fn PassUnion6(&self, _: UnsignedLongOrBoolean) {} PassUnion7(&self, _: StringSequenceOrUnsignedLong)437 fn PassUnion7(&self, _: StringSequenceOrUnsignedLong) {} PassUnion8(&self, _: ByteStringSequenceOrLong)438 fn PassUnion8(&self, _: ByteStringSequenceOrLong) {} PassUnion9(&self, _: UnionTypes::TestDictionaryOrLong)439 fn PassUnion9(&self, _: UnionTypes::TestDictionaryOrLong) {} 440 #[allow(unsafe_code)] PassUnion10(&self, _: *mut JSContext, _: UnionTypes::StringOrObject)441 unsafe fn PassUnion10(&self, _: *mut JSContext, _: UnionTypes::StringOrObject) {} PassUnionWithTypedef(&self, _: DocumentOrTestTypedef)442 fn PassUnionWithTypedef(&self, _: DocumentOrTestTypedef) {} PassUnionWithTypedef2(&self, _: LongSequenceOrTestTypedef)443 fn PassUnionWithTypedef2(&self, _: LongSequenceOrTestTypedef) {} 444 #[allow(unsafe_code)] PassAny(&self, _: *mut JSContext, _: HandleValue)445 unsafe fn PassAny(&self, _: *mut JSContext, _: HandleValue) {} 446 #[allow(unsafe_code)] PassObject(&self, _: *mut JSContext, _: *mut JSObject)447 unsafe fn PassObject(&self, _: *mut JSContext, _: *mut JSObject) {} PassCallbackFunction(&self, _: Rc<Function>)448 fn PassCallbackFunction(&self, _: Rc<Function>) {} PassCallbackInterface(&self, _: Rc<EventListener>)449 fn PassCallbackInterface(&self, _: Rc<EventListener>) {} PassSequence(&self, _: Vec<i32>)450 fn PassSequence(&self, _: Vec<i32>) {} 451 #[allow(unsafe_code)] PassAnySequence(&self, _: *mut JSContext, _: CustomAutoRooterGuard<Vec<JSVal>>)452 unsafe fn PassAnySequence(&self, _: *mut JSContext, _: CustomAutoRooterGuard<Vec<JSVal>>) {} 453 #[allow(unsafe_code)] AnySequencePassthrough(&self, _: *mut JSContext, seq: CustomAutoRooterGuard<Vec<JSVal>>) -> Vec<JSVal>454 unsafe fn AnySequencePassthrough(&self, _: *mut JSContext, seq: CustomAutoRooterGuard<Vec<JSVal>>) -> Vec<JSVal> { 455 (*seq).clone() 456 } 457 #[allow(unsafe_code)] PassObjectSequence(&self, _: *mut JSContext, _: CustomAutoRooterGuard<Vec<*mut JSObject>>)458 unsafe fn PassObjectSequence(&self, _: *mut JSContext, _: CustomAutoRooterGuard<Vec<*mut JSObject>>) {} PassStringSequence(&self, _: Vec<DOMString>)459 fn PassStringSequence(&self, _: Vec<DOMString>) {} PassInterfaceSequence(&self, _: Vec<DomRoot<Blob>>)460 fn PassInterfaceSequence(&self, _: Vec<DomRoot<Blob>>) {} 461 PassNullableBoolean(&self, _: Option<bool>)462 fn PassNullableBoolean(&self, _: Option<bool>) {} PassNullableByte(&self, _: Option<i8>)463 fn PassNullableByte(&self, _: Option<i8>) {} PassNullableOctet(&self, _: Option<u8>)464 fn PassNullableOctet(&self, _: Option<u8>) {} PassNullableShort(&self, _: Option<i16>)465 fn PassNullableShort(&self, _: Option<i16>) {} PassNullableUnsignedShort(&self, _: Option<u16>)466 fn PassNullableUnsignedShort(&self, _: Option<u16>) {} PassNullableLong(&self, _: Option<i32>)467 fn PassNullableLong(&self, _: Option<i32>) {} PassNullableUnsignedLong(&self, _: Option<u32>)468 fn PassNullableUnsignedLong(&self, _: Option<u32>) {} PassNullableLongLong(&self, _: Option<i64>)469 fn PassNullableLongLong(&self, _: Option<i64>) {} PassNullableUnsignedLongLong(&self, _: Option<u64>)470 fn PassNullableUnsignedLongLong(&self, _: Option<u64>) {} PassNullableUnrestrictedFloat(&self, _: Option<f32>)471 fn PassNullableUnrestrictedFloat(&self, _: Option<f32>) {} PassNullableFloat(&self, _: Option<Finite<f32>>)472 fn PassNullableFloat(&self, _: Option<Finite<f32>>) {} PassNullableUnrestrictedDouble(&self, _: Option<f64>)473 fn PassNullableUnrestrictedDouble(&self, _: Option<f64>) {} PassNullableDouble(&self, _: Option<Finite<f64>>)474 fn PassNullableDouble(&self, _: Option<Finite<f64>>) {} PassNullableString(&self, _: Option<DOMString>)475 fn PassNullableString(&self, _: Option<DOMString>) {} PassNullableUsvstring(&self, _: Option<USVString>)476 fn PassNullableUsvstring(&self, _: Option<USVString>) {} PassNullableByteString(&self, _: Option<ByteString>)477 fn PassNullableByteString(&self, _: Option<ByteString>) {} 478 // fn PassNullableEnum(self, _: Option<TestEnum>) {} PassNullableInterface(&self, _: Option<&Blob>)479 fn PassNullableInterface(&self, _: Option<&Blob>) {} 480 #[allow(unsafe_code)] PassNullableObject(&self, _: *mut JSContext, _: *mut JSObject)481 unsafe fn PassNullableObject(&self, _: *mut JSContext, _: *mut JSObject) {} PassNullableUnion(&self, _: Option<HTMLElementOrLong>)482 fn PassNullableUnion(&self, _: Option<HTMLElementOrLong>) {} PassNullableUnion2(&self, _: Option<EventOrString>)483 fn PassNullableUnion2(&self, _: Option<EventOrString>) {} PassNullableUnion3(&self, _: Option<StringOrLongSequence>)484 fn PassNullableUnion3(&self, _: Option<StringOrLongSequence>) {} PassNullableUnion4(&self, _: Option<LongSequenceOrBoolean>)485 fn PassNullableUnion4(&self, _: Option<LongSequenceOrBoolean>) {} PassNullableUnion5(&self, _: Option<UnsignedLongOrBoolean>)486 fn PassNullableUnion5(&self, _: Option<UnsignedLongOrBoolean>) {} PassNullableUnion6(&self, _: Option<ByteStringOrLong>)487 fn PassNullableUnion6(&self, _: Option<ByteStringOrLong>) {} PassNullableCallbackFunction(&self, _: Option<Rc<Function>>)488 fn PassNullableCallbackFunction(&self, _: Option<Rc<Function>>) {} PassNullableCallbackInterface(&self, _: Option<Rc<EventListener>>)489 fn PassNullableCallbackInterface(&self, _: Option<Rc<EventListener>>) {} PassNullableSequence(&self, _: Option<Vec<i32>>)490 fn PassNullableSequence(&self, _: Option<Vec<i32>>) {} 491 PassOptionalBoolean(&self, _: Option<bool>)492 fn PassOptionalBoolean(&self, _: Option<bool>) {} PassOptionalByte(&self, _: Option<i8>)493 fn PassOptionalByte(&self, _: Option<i8>) {} PassOptionalOctet(&self, _: Option<u8>)494 fn PassOptionalOctet(&self, _: Option<u8>) {} PassOptionalShort(&self, _: Option<i16>)495 fn PassOptionalShort(&self, _: Option<i16>) {} PassOptionalUnsignedShort(&self, _: Option<u16>)496 fn PassOptionalUnsignedShort(&self, _: Option<u16>) {} PassOptionalLong(&self, _: Option<i32>)497 fn PassOptionalLong(&self, _: Option<i32>) {} PassOptionalUnsignedLong(&self, _: Option<u32>)498 fn PassOptionalUnsignedLong(&self, _: Option<u32>) {} PassOptionalLongLong(&self, _: Option<i64>)499 fn PassOptionalLongLong(&self, _: Option<i64>) {} PassOptionalUnsignedLongLong(&self, _: Option<u64>)500 fn PassOptionalUnsignedLongLong(&self, _: Option<u64>) {} PassOptionalUnrestrictedFloat(&self, _: Option<f32>)501 fn PassOptionalUnrestrictedFloat(&self, _: Option<f32>) {} PassOptionalFloat(&self, _: Option<Finite<f32>>)502 fn PassOptionalFloat(&self, _: Option<Finite<f32>>) {} PassOptionalUnrestrictedDouble(&self, _: Option<f64>)503 fn PassOptionalUnrestrictedDouble(&self, _: Option<f64>) {} PassOptionalDouble(&self, _: Option<Finite<f64>>)504 fn PassOptionalDouble(&self, _: Option<Finite<f64>>) {} PassOptionalString(&self, _: Option<DOMString>)505 fn PassOptionalString(&self, _: Option<DOMString>) {} PassOptionalUsvstring(&self, _: Option<USVString>)506 fn PassOptionalUsvstring(&self, _: Option<USVString>) {} PassOptionalByteString(&self, _: Option<ByteString>)507 fn PassOptionalByteString(&self, _: Option<ByteString>) {} PassOptionalEnum(&self, _: Option<TestEnum>)508 fn PassOptionalEnum(&self, _: Option<TestEnum>) {} PassOptionalInterface(&self, _: Option<&Blob>)509 fn PassOptionalInterface(&self, _: Option<&Blob>) {} PassOptionalUnion(&self, _: Option<HTMLElementOrLong>)510 fn PassOptionalUnion(&self, _: Option<HTMLElementOrLong>) {} PassOptionalUnion2(&self, _: Option<EventOrString>)511 fn PassOptionalUnion2(&self, _: Option<EventOrString>) {} PassOptionalUnion3(&self, _: Option<StringOrLongSequence>)512 fn PassOptionalUnion3(&self, _: Option<StringOrLongSequence>) {} PassOptionalUnion4(&self, _: Option<LongSequenceOrBoolean>)513 fn PassOptionalUnion4(&self, _: Option<LongSequenceOrBoolean>) {} PassOptionalUnion5(&self, _: Option<UnsignedLongOrBoolean>)514 fn PassOptionalUnion5(&self, _: Option<UnsignedLongOrBoolean>) {} PassOptionalUnion6(&self, _: Option<ByteStringOrLong>)515 fn PassOptionalUnion6(&self, _: Option<ByteStringOrLong>) {} 516 #[allow(unsafe_code)] PassOptionalAny(&self, _: *mut JSContext, _: HandleValue)517 unsafe fn PassOptionalAny(&self, _: *mut JSContext, _: HandleValue) {} 518 #[allow(unsafe_code)] PassOptionalObject(&self, _: *mut JSContext, _: Option<*mut JSObject>)519 unsafe fn PassOptionalObject(&self, _: *mut JSContext, _: Option<*mut JSObject>) {} PassOptionalCallbackFunction(&self, _: Option<Rc<Function>>)520 fn PassOptionalCallbackFunction(&self, _: Option<Rc<Function>>) {} PassOptionalCallbackInterface(&self, _: Option<Rc<EventListener>>)521 fn PassOptionalCallbackInterface(&self, _: Option<Rc<EventListener>>) {} PassOptionalSequence(&self, _: Option<Vec<i32>>)522