mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #9580 - zakorgy:pythonfix, r=Ms2ger
Fixing issue with uniontypes not created with primitive types Fixes #9531 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9580) <!-- Reviewable:end -->
This commit is contained in:
commit
9778e5e84d
3 changed files with 135 additions and 20 deletions
|
@ -3745,25 +3745,50 @@ class CGUnionConversionStruct(CGThing):
|
||||||
if arrayObject:
|
if arrayObject:
|
||||||
templateBody.append(arrayObject)
|
templateBody.append(arrayObject)
|
||||||
conversions.append(CGIfWrapper("value.get().is_object()", templateBody))
|
conversions.append(CGIfWrapper("value.get().is_object()", templateBody))
|
||||||
|
stringTypes = [t for t in memberTypes if t.isString() or t.isEnum()]
|
||||||
|
numericTypes = [t for t in memberTypes if t.isNumeric()]
|
||||||
|
booleanTypes = [t for t in memberTypes if t.isBoolean()]
|
||||||
|
if stringTypes or numericTypes or booleanTypes:
|
||||||
|
assert len(stringTypes) <= 1
|
||||||
|
assert len(numericTypes) <= 1
|
||||||
|
assert len(booleanTypes) <= 1
|
||||||
|
|
||||||
otherMemberTypes = [
|
def getStringOrPrimitiveConversion(memberType):
|
||||||
t for t in memberTypes if t.isPrimitive() or t.isString() or t.isEnum()
|
typename = get_name(memberType)
|
||||||
]
|
return CGGeneric(get_match(typename))
|
||||||
if len(otherMemberTypes) > 0:
|
other = []
|
||||||
assert len(otherMemberTypes) == 1
|
stringConversion = map(getStringOrPrimitiveConversion, stringTypes)
|
||||||
memberType = otherMemberTypes[0]
|
numericConversion = map(getStringOrPrimitiveConversion, numericTypes)
|
||||||
if memberType.isEnum():
|
booleanConversion = map(getStringOrPrimitiveConversion, booleanTypes)
|
||||||
name = memberType.inner.identifier.name
|
if stringConversion:
|
||||||
|
if booleanConversion:
|
||||||
|
other.append(CGIfWrapper("value.get().is_boolean()", booleanConversion[0]))
|
||||||
|
if numericConversion:
|
||||||
|
other.append(CGIfWrapper("value.get().is_number()", numericConversion[0]))
|
||||||
|
other.append(stringConversion[0])
|
||||||
|
elif numericConversion:
|
||||||
|
if booleanConversion:
|
||||||
|
other.append(CGIfWrapper("value.get().is_boolean()", booleanConversion[0]))
|
||||||
|
other.append(numericConversion[0])
|
||||||
else:
|
else:
|
||||||
name = memberType.name
|
assert booleanConversion
|
||||||
match = (
|
other.append(booleanConversion[0])
|
||||||
"match %s::TryConvertTo%s(cx, value) {\n"
|
conversions.append(CGList(other, "\n\n"))
|
||||||
" Err(_) => return Err(()),\n"
|
conversions.append(CGGeneric(
|
||||||
" Ok(Some(value)) => return Ok(%s::%s(value)),\n"
|
"throw_not_in_union(cx, \"%s\");\n"
|
||||||
" Ok(None) => (),\n"
|
"Err(())" % ", ".join(names)))
|
||||||
"}\n") % (self.type, name, self.type, name)
|
method = CGWrapper(
|
||||||
conversions.append(CGGeneric(match))
|
CGIndenter(CGList(conversions, "\n\n")),
|
||||||
names.append(name)
|
pre="unsafe fn from_jsval(cx: *mut JSContext,\n"
|
||||||
|
" value: HandleValue, _option: ()) -> Result<%s, ()> {\n" % self.type,
|
||||||
|
post="\n}")
|
||||||
|
return CGWrapper(
|
||||||
|
CGIndenter(CGList([
|
||||||
|
CGGeneric("type Config = ();"),
|
||||||
|
method,
|
||||||
|
], "\n")),
|
||||||
|
pre="impl FromJSValConvertible for %s {\n" % self.type,
|
||||||
|
post="\n}")
|
||||||
|
|
||||||
conversions.append(CGGeneric(
|
conversions.append(CGGeneric(
|
||||||
"throw_not_in_union(cx, \"%s\");\n"
|
"throw_not_in_union(cx, \"%s\");\n"
|
||||||
|
|
|
@ -7,10 +7,12 @@
|
||||||
use dom::bindings::codegen::Bindings::EventListenerBinding::EventListener;
|
use dom::bindings::codegen::Bindings::EventListenerBinding::EventListener;
|
||||||
use dom::bindings::codegen::Bindings::FunctionBinding::Function;
|
use dom::bindings::codegen::Bindings::FunctionBinding::Function;
|
||||||
use dom::bindings::codegen::Bindings::TestBindingBinding::{self, TestBindingMethods, TestEnum};
|
use dom::bindings::codegen::Bindings::TestBindingBinding::{self, TestBindingMethods, TestEnum};
|
||||||
use dom::bindings::codegen::UnionTypes::{BlobOrBlobSequence};
|
use dom::bindings::codegen::UnionTypes::{BlobOrBoolean, BlobOrBlobSequence};
|
||||||
use dom::bindings::codegen::UnionTypes::{BlobOrString, EventOrString};
|
use dom::bindings::codegen::UnionTypes::{BlobOrString, BlobOrUnsignedLong, EventOrString};
|
||||||
use dom::bindings::codegen::UnionTypes::{EventOrUSVString, HTMLElementOrLong};
|
use dom::bindings::codegen::UnionTypes::{EventOrUSVString, HTMLElementOrLong};
|
||||||
use dom::bindings::codegen::UnionTypes::{StringOrLongSequence, StringOrStringSequence};
|
use dom::bindings::codegen::UnionTypes::{HTMLElementOrUnsignedLongOrStringOrBoolean, LongSequenceOrBoolean};
|
||||||
|
use dom::bindings::codegen::UnionTypes::{StringOrLongSequence, StringOrStringSequence, StringSequenceOrUnsignedLong};
|
||||||
|
use dom::bindings::codegen::UnionTypes::{StringOrUnsignedLong, StringOrBoolean, UnsignedLongOrBoolean};
|
||||||
use dom::bindings::error::Fallible;
|
use dom::bindings::error::Fallible;
|
||||||
use dom::bindings::global::GlobalRef;
|
use dom::bindings::global::GlobalRef;
|
||||||
use dom::bindings::js::Root;
|
use dom::bindings::js::Root;
|
||||||
|
@ -98,6 +100,26 @@ impl TestBindingMethods for TestBinding {
|
||||||
EventOrUSVString::USVString(USVString("".to_owned()))
|
EventOrUSVString::USVString(USVString("".to_owned()))
|
||||||
}
|
}
|
||||||
fn SetUnion3Attribute(&self, _: EventOrUSVString) {}
|
fn SetUnion3Attribute(&self, _: EventOrUSVString) {}
|
||||||
|
fn Union4Attribute(&self) -> StringOrUnsignedLong {
|
||||||
|
StringOrUnsignedLong::UnsignedLong(0u32)
|
||||||
|
}
|
||||||
|
fn SetUnion4Attribute(&self, _: StringOrUnsignedLong) {}
|
||||||
|
fn Union5Attribute(&self) -> StringOrBoolean {
|
||||||
|
StringOrBoolean::Boolean(true)
|
||||||
|
}
|
||||||
|
fn SetUnion5Attribute(&self, _: StringOrBoolean) {}
|
||||||
|
fn Union6Attribute(&self) -> UnsignedLongOrBoolean {
|
||||||
|
UnsignedLongOrBoolean::Boolean(true)
|
||||||
|
}
|
||||||
|
fn SetUnion6Attribute(&self, _: UnsignedLongOrBoolean) {}
|
||||||
|
fn Union7Attribute(&self) -> BlobOrBoolean {
|
||||||
|
BlobOrBoolean::Boolean(true)
|
||||||
|
}
|
||||||
|
fn SetUnion7Attribute(&self, _: BlobOrBoolean) {}
|
||||||
|
fn Union8Attribute(&self) -> BlobOrUnsignedLong {
|
||||||
|
BlobOrUnsignedLong::UnsignedLong(0u32)
|
||||||
|
}
|
||||||
|
fn SetUnion8Attribute(&self, _: BlobOrUnsignedLong) {}
|
||||||
fn ArrayAttribute(&self, _: *mut JSContext) -> *mut JSObject { NullValue().to_object_or_null() }
|
fn ArrayAttribute(&self, _: *mut JSContext) -> *mut JSObject { NullValue().to_object_or_null() }
|
||||||
fn AnyAttribute(&self, _: *mut JSContext) -> JSVal { NullValue() }
|
fn AnyAttribute(&self, _: *mut JSContext) -> JSVal { NullValue() }
|
||||||
fn SetAnyAttribute(&self, _: *mut JSContext, _: HandleValue) {}
|
fn SetAnyAttribute(&self, _: *mut JSContext, _: HandleValue) {}
|
||||||
|
@ -164,6 +186,18 @@ impl TestBindingMethods for TestBinding {
|
||||||
Some(EventOrString::String(DOMString::new()))
|
Some(EventOrString::String(DOMString::new()))
|
||||||
}
|
}
|
||||||
fn SetUnion2AttributeNullable(&self, _: Option<EventOrString>) {}
|
fn SetUnion2AttributeNullable(&self, _: Option<EventOrString>) {}
|
||||||
|
fn GetUnion3AttributeNullable(&self) -> Option<BlobOrBoolean> {
|
||||||
|
Some(BlobOrBoolean::Boolean(true))
|
||||||
|
}
|
||||||
|
fn SetUnion3AttributeNullable(&self, _: Option<BlobOrBoolean>) {}
|
||||||
|
fn GetUnion4AttributeNullable(&self) -> Option<UnsignedLongOrBoolean> {
|
||||||
|
Some(UnsignedLongOrBoolean::Boolean(true))
|
||||||
|
}
|
||||||
|
fn SetUnion4AttributeNullable(&self, _: Option<UnsignedLongOrBoolean>) {}
|
||||||
|
fn GetUnion5AttributeNullable(&self) -> Option<StringOrBoolean> {
|
||||||
|
Some(StringOrBoolean::Boolean(true))
|
||||||
|
}
|
||||||
|
fn SetUnion5AttributeNullable(&self, _: Option<StringOrBoolean>) {}
|
||||||
fn BinaryRenamedMethod(&self) -> () {}
|
fn BinaryRenamedMethod(&self) -> () {}
|
||||||
fn ReceiveVoid(&self) -> () {}
|
fn ReceiveVoid(&self) -> () {}
|
||||||
fn ReceiveBoolean(&self) -> bool { false }
|
fn ReceiveBoolean(&self) -> bool { false }
|
||||||
|
@ -193,6 +227,12 @@ impl TestBindingMethods for TestBinding {
|
||||||
fn ReceiveUnion3(&self) -> StringOrLongSequence { StringOrLongSequence::LongSequence(vec![]) }
|
fn ReceiveUnion3(&self) -> StringOrLongSequence { StringOrLongSequence::LongSequence(vec![]) }
|
||||||
fn ReceiveUnion4(&self) -> StringOrStringSequence { StringOrStringSequence::StringSequence(vec![]) }
|
fn ReceiveUnion4(&self) -> StringOrStringSequence { StringOrStringSequence::StringSequence(vec![]) }
|
||||||
fn ReceiveUnion5(&self) -> BlobOrBlobSequence { BlobOrBlobSequence::BlobSequence(vec![]) }
|
fn ReceiveUnion5(&self) -> BlobOrBlobSequence { BlobOrBlobSequence::BlobSequence(vec![]) }
|
||||||
|
fn ReceiveUnion6(&self) -> StringOrUnsignedLong { StringOrUnsignedLong::String(DOMString::new()) }
|
||||||
|
fn ReceiveUnion7(&self) -> StringOrBoolean { StringOrBoolean::Boolean(true) }
|
||||||
|
fn ReceiveUnion8(&self) -> UnsignedLongOrBoolean { UnsignedLongOrBoolean::UnsignedLong(0u32) }
|
||||||
|
fn ReceiveUnion9(&self) -> HTMLElementOrUnsignedLongOrStringOrBoolean {
|
||||||
|
HTMLElementOrUnsignedLongOrStringOrBoolean::Boolean(true)
|
||||||
|
}
|
||||||
fn ReceiveSequence(&self) -> Vec<i32> { vec![1] }
|
fn ReceiveSequence(&self) -> Vec<i32> { vec![1] }
|
||||||
fn ReceiveInterfaceSequence(&self) -> Vec<Root<Blob>> {
|
fn ReceiveInterfaceSequence(&self) -> Vec<Root<Blob>> {
|
||||||
vec![Blob::new(self.global().r(), Vec::new(), "")]
|
vec![Blob::new(self.global().r(), Vec::new(), "")]
|
||||||
|
@ -228,6 +268,12 @@ impl TestBindingMethods for TestBinding {
|
||||||
fn ReceiveNullableUnion3(&self) -> Option<StringOrLongSequence> {
|
fn ReceiveNullableUnion3(&self) -> Option<StringOrLongSequence> {
|
||||||
Some(StringOrLongSequence::String(DOMString::new()))
|
Some(StringOrLongSequence::String(DOMString::new()))
|
||||||
}
|
}
|
||||||
|
fn ReceiveNullableUnion4(&self) -> Option<LongSequenceOrBoolean> {
|
||||||
|
Some(LongSequenceOrBoolean::Boolean(true))
|
||||||
|
}
|
||||||
|
fn ReceiveNullableUnion5(&self) -> Option<UnsignedLongOrBoolean> {
|
||||||
|
Some(UnsignedLongOrBoolean::UnsignedLong(0u32))
|
||||||
|
}
|
||||||
fn ReceiveNullableSequence(&self) -> Option<Vec<i32>> { Some(vec![1]) }
|
fn ReceiveNullableSequence(&self) -> Option<Vec<i32>> { Some(vec![1]) }
|
||||||
|
|
||||||
fn PassBoolean(&self, _: bool) {}
|
fn PassBoolean(&self, _: bool) {}
|
||||||
|
@ -252,6 +298,9 @@ impl TestBindingMethods for TestBinding {
|
||||||
fn PassUnion2(&self, _: EventOrString) {}
|
fn PassUnion2(&self, _: EventOrString) {}
|
||||||
fn PassUnion3(&self, _: BlobOrString) {}
|
fn PassUnion3(&self, _: BlobOrString) {}
|
||||||
fn PassUnion4(&self, _: StringOrStringSequence) {}
|
fn PassUnion4(&self, _: StringOrStringSequence) {}
|
||||||
|
fn PassUnion5(&self, _: StringOrBoolean) {}
|
||||||
|
fn PassUnion6(&self, _: UnsignedLongOrBoolean) {}
|
||||||
|
fn PassUnion7(&self, _: StringSequenceOrUnsignedLong) {}
|
||||||
fn PassAny(&self, _: *mut JSContext, _: HandleValue) {}
|
fn PassAny(&self, _: *mut JSContext, _: HandleValue) {}
|
||||||
fn PassObject(&self, _: *mut JSContext, _: *mut JSObject) {}
|
fn PassObject(&self, _: *mut JSContext, _: *mut JSObject) {}
|
||||||
fn PassCallbackFunction(&self, _: Rc<Function>) {}
|
fn PassCallbackFunction(&self, _: Rc<Function>) {}
|
||||||
|
@ -281,6 +330,9 @@ impl TestBindingMethods for TestBinding {
|
||||||
fn PassNullableObject(&self, _: *mut JSContext, _: *mut JSObject) {}
|
fn PassNullableObject(&self, _: *mut JSContext, _: *mut JSObject) {}
|
||||||
fn PassNullableUnion(&self, _: Option<HTMLElementOrLong>) {}
|
fn PassNullableUnion(&self, _: Option<HTMLElementOrLong>) {}
|
||||||
fn PassNullableUnion2(&self, _: Option<EventOrString>) {}
|
fn PassNullableUnion2(&self, _: Option<EventOrString>) {}
|
||||||
|
fn PassNullableUnion3(&self, _: Option<StringOrLongSequence>) {}
|
||||||
|
fn PassNullableUnion4(&self, _: Option<LongSequenceOrBoolean>) {}
|
||||||
|
fn PassNullableUnion5(&self, _: Option<UnsignedLongOrBoolean>) {}
|
||||||
fn PassNullableCallbackFunction(&self, _: Option<Rc<Function>>) {}
|
fn PassNullableCallbackFunction(&self, _: Option<Rc<Function>>) {}
|
||||||
fn PassNullableCallbackInterface(&self, _: Option<Rc<EventListener>>) {}
|
fn PassNullableCallbackInterface(&self, _: Option<Rc<EventListener>>) {}
|
||||||
fn PassNullableSequence(&self, _: Option<Vec<i32>>) {}
|
fn PassNullableSequence(&self, _: Option<Vec<i32>>) {}
|
||||||
|
@ -305,6 +357,9 @@ impl TestBindingMethods for TestBinding {
|
||||||
fn PassOptionalInterface(&self, _: Option<&Blob>) {}
|
fn PassOptionalInterface(&self, _: Option<&Blob>) {}
|
||||||
fn PassOptionalUnion(&self, _: Option<HTMLElementOrLong>) {}
|
fn PassOptionalUnion(&self, _: Option<HTMLElementOrLong>) {}
|
||||||
fn PassOptionalUnion2(&self, _: Option<EventOrString>) {}
|
fn PassOptionalUnion2(&self, _: Option<EventOrString>) {}
|
||||||
|
fn PassOptionalUnion3(&self, _: Option<StringOrLongSequence>) {}
|
||||||
|
fn PassOptionalUnion4(&self, _: Option<LongSequenceOrBoolean>) {}
|
||||||
|
fn PassOptionalUnion5(&self, _: Option<UnsignedLongOrBoolean>) {}
|
||||||
fn PassOptionalAny(&self, _: *mut JSContext, _: HandleValue) {}
|
fn PassOptionalAny(&self, _: *mut JSContext, _: HandleValue) {}
|
||||||
fn PassOptionalObject(&self, _: *mut JSContext, _: Option<*mut JSObject>) {}
|
fn PassOptionalObject(&self, _: *mut JSContext, _: Option<*mut JSObject>) {}
|
||||||
fn PassOptionalCallbackFunction(&self, _: Option<Rc<Function>>) {}
|
fn PassOptionalCallbackFunction(&self, _: Option<Rc<Function>>) {}
|
||||||
|
@ -332,6 +387,9 @@ impl TestBindingMethods for TestBinding {
|
||||||
fn PassOptionalNullableObject(&self, _: *mut JSContext, _: Option<*mut JSObject>) {}
|
fn PassOptionalNullableObject(&self, _: *mut JSContext, _: Option<*mut JSObject>) {}
|
||||||
fn PassOptionalNullableUnion(&self, _: Option<Option<HTMLElementOrLong>>) {}
|
fn PassOptionalNullableUnion(&self, _: Option<Option<HTMLElementOrLong>>) {}
|
||||||
fn PassOptionalNullableUnion2(&self, _: Option<Option<EventOrString>>) {}
|
fn PassOptionalNullableUnion2(&self, _: Option<Option<EventOrString>>) {}
|
||||||
|
fn PassOptionalNullableUnion3(&self, _: Option<Option<StringOrLongSequence>>) {}
|
||||||
|
fn PassOptionalNullableUnion4(&self, _: Option<Option<LongSequenceOrBoolean>>) {}
|
||||||
|
fn PassOptionalNullableUnion5(&self, _: Option<Option<UnsignedLongOrBoolean>>) {}
|
||||||
fn PassOptionalNullableCallbackFunction(&self, _: Option<Option<Rc<Function>>>) {}
|
fn PassOptionalNullableCallbackFunction(&self, _: Option<Option<Rc<Function>>>) {}
|
||||||
fn PassOptionalNullableCallbackInterface(&self, _: Option<Option<Rc<EventListener>>>) {}
|
fn PassOptionalNullableCallbackInterface(&self, _: Option<Option<Rc<EventListener>>>) {}
|
||||||
fn PassOptionalNullableSequence(&self, _: Option<Option<Vec<i32>>>) {}
|
fn PassOptionalNullableSequence(&self, _: Option<Option<Vec<i32>>>) {}
|
||||||
|
@ -413,6 +471,9 @@ impl TestBindingMethods for TestBinding {
|
||||||
fn PassVariadicUnion(&self, _: Vec<HTMLElementOrLong>) {}
|
fn PassVariadicUnion(&self, _: Vec<HTMLElementOrLong>) {}
|
||||||
fn PassVariadicUnion2(&self, _: Vec<EventOrString>) {}
|
fn PassVariadicUnion2(&self, _: Vec<EventOrString>) {}
|
||||||
fn PassVariadicUnion3(&self, _: Vec<BlobOrString>) {}
|
fn PassVariadicUnion3(&self, _: Vec<BlobOrString>) {}
|
||||||
|
fn PassVariadicUnion4(&self, _: Vec<BlobOrBoolean>) {}
|
||||||
|
fn PassVariadicUnion5(&self, _: Vec<StringOrUnsignedLong>) {}
|
||||||
|
fn PassVariadicUnion6(&self, _: Vec<UnsignedLongOrBoolean>) {}
|
||||||
fn PassVariadicAny(&self, _: *mut JSContext, _: Vec<HandleValue>) {}
|
fn PassVariadicAny(&self, _: *mut JSContext, _: Vec<HandleValue>) {}
|
||||||
fn PassVariadicObject(&self, _: *mut JSContext, _: Vec<*mut JSObject>) {}
|
fn PassVariadicObject(&self, _: *mut JSContext, _: Vec<*mut JSObject>) {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,6 +92,11 @@ interface TestBinding {
|
||||||
attribute (HTMLElement or long) unionAttribute;
|
attribute (HTMLElement or long) unionAttribute;
|
||||||
attribute (Event or DOMString) union2Attribute;
|
attribute (Event or DOMString) union2Attribute;
|
||||||
attribute (Event or USVString) union3Attribute;
|
attribute (Event or USVString) union3Attribute;
|
||||||
|
attribute (DOMString or unsigned long) union4Attribute;
|
||||||
|
attribute (DOMString or boolean) union5Attribute;
|
||||||
|
attribute (unsigned long or boolean) union6Attribute;
|
||||||
|
attribute (Blob or boolean) union7Attribute;
|
||||||
|
attribute (Blob or unsigned long) union8Attribute;
|
||||||
readonly attribute Uint8ClampedArray arrayAttribute;
|
readonly attribute Uint8ClampedArray arrayAttribute;
|
||||||
attribute any anyAttribute;
|
attribute any anyAttribute;
|
||||||
attribute object objectAttribute;
|
attribute object objectAttribute;
|
||||||
|
@ -118,6 +123,9 @@ interface TestBinding {
|
||||||
attribute object? objectAttributeNullable;
|
attribute object? objectAttributeNullable;
|
||||||
attribute (HTMLElement or long)? unionAttributeNullable;
|
attribute (HTMLElement or long)? unionAttributeNullable;
|
||||||
attribute (Event or DOMString)? union2AttributeNullable;
|
attribute (Event or DOMString)? union2AttributeNullable;
|
||||||
|
attribute (Blob or boolean)? union3AttributeNullable;
|
||||||
|
attribute (unsigned long or boolean)? union4AttributeNullable;
|
||||||
|
attribute (DOMString or boolean)? union5AttributeNullable;
|
||||||
[BinaryName="BinaryRenamedAttribute"] attribute DOMString attrToBinaryRename;
|
[BinaryName="BinaryRenamedAttribute"] attribute DOMString attrToBinaryRename;
|
||||||
[BinaryName="BinaryRenamedAttribute2"] attribute DOMString attr-to-binary-rename;
|
[BinaryName="BinaryRenamedAttribute2"] attribute DOMString attr-to-binary-rename;
|
||||||
attribute DOMString attr-to-automatically-rename;
|
attribute DOMString attr-to-automatically-rename;
|
||||||
|
@ -152,6 +160,10 @@ interface TestBinding {
|
||||||
(DOMString or sequence<long>) receiveUnion3();
|
(DOMString or sequence<long>) receiveUnion3();
|
||||||
(DOMString or sequence<DOMString>) receiveUnion4();
|
(DOMString or sequence<DOMString>) receiveUnion4();
|
||||||
(Blob or sequence<Blob>) receiveUnion5();
|
(Blob or sequence<Blob>) receiveUnion5();
|
||||||
|
(DOMString or unsigned long) receiveUnion6();
|
||||||
|
(DOMString or boolean) receiveUnion7();
|
||||||
|
(unsigned long or boolean) receiveUnion8();
|
||||||
|
(HTMLElement or unsigned long or DOMString or boolean) receiveUnion9();
|
||||||
sequence<long> receiveSequence();
|
sequence<long> receiveSequence();
|
||||||
sequence<Blob> receiveInterfaceSequence();
|
sequence<Blob> receiveInterfaceSequence();
|
||||||
|
|
||||||
|
@ -177,6 +189,8 @@ interface TestBinding {
|
||||||
(HTMLElement or long)? receiveNullableUnion();
|
(HTMLElement or long)? receiveNullableUnion();
|
||||||
(Event or DOMString)? receiveNullableUnion2();
|
(Event or DOMString)? receiveNullableUnion2();
|
||||||
(DOMString or sequence<long>)? receiveNullableUnion3();
|
(DOMString or sequence<long>)? receiveNullableUnion3();
|
||||||
|
(sequence<long> or boolean)? receiveNullableUnion4();
|
||||||
|
(unsigned long or boolean)? receiveNullableUnion5();
|
||||||
sequence<long>? receiveNullableSequence();
|
sequence<long>? receiveNullableSequence();
|
||||||
|
|
||||||
void passBoolean(boolean arg);
|
void passBoolean(boolean arg);
|
||||||
|
@ -201,6 +215,9 @@ interface TestBinding {
|
||||||
void passUnion2((Event or DOMString) data);
|
void passUnion2((Event or DOMString) data);
|
||||||
void passUnion3((Blob or DOMString) data);
|
void passUnion3((Blob or DOMString) data);
|
||||||
void passUnion4((DOMString or sequence<DOMString>) seq);
|
void passUnion4((DOMString or sequence<DOMString>) seq);
|
||||||
|
void passUnion5((DOMString or boolean) data);
|
||||||
|
void passUnion6((unsigned long or boolean) bool);
|
||||||
|
void passUnion7((sequence<DOMString> or unsigned long) arg);
|
||||||
void passAny(any arg);
|
void passAny(any arg);
|
||||||
void passObject(object arg);
|
void passObject(object arg);
|
||||||
void passCallbackFunction(Function fun);
|
void passCallbackFunction(Function fun);
|
||||||
|
@ -230,6 +247,9 @@ interface TestBinding {
|
||||||
void passNullableObject(object? arg);
|
void passNullableObject(object? arg);
|
||||||
void passNullableUnion((HTMLElement or long)? arg);
|
void passNullableUnion((HTMLElement or long)? arg);
|
||||||
void passNullableUnion2((Event or DOMString)? data);
|
void passNullableUnion2((Event or DOMString)? data);
|
||||||
|
void passNullableUnion3((DOMString or sequence<long>)? data);
|
||||||
|
void passNullableUnion4((sequence<long> or boolean)? bool);
|
||||||
|
void passNullableUnion5((unsigned long or boolean)? arg);
|
||||||
void passNullableCallbackFunction(Function? fun);
|
void passNullableCallbackFunction(Function? fun);
|
||||||
void passNullableCallbackInterface(EventListener? listener);
|
void passNullableCallbackInterface(EventListener? listener);
|
||||||
void passNullableSequence(sequence<long>? seq);
|
void passNullableSequence(sequence<long>? seq);
|
||||||
|
@ -254,6 +274,9 @@ interface TestBinding {
|
||||||
void passOptionalInterface(optional Blob arg);
|
void passOptionalInterface(optional Blob arg);
|
||||||
void passOptionalUnion(optional (HTMLElement or long) arg);
|
void passOptionalUnion(optional (HTMLElement or long) arg);
|
||||||
void passOptionalUnion2(optional (Event or DOMString) data);
|
void passOptionalUnion2(optional (Event or DOMString) data);
|
||||||
|
void passOptionalUnion3(optional (DOMString or sequence<long>) arg);
|
||||||
|
void passOptionalUnion4(optional (sequence<long> or boolean) data);
|
||||||
|
void passOptionalUnion5(optional (unsigned long or boolean) bool);
|
||||||
void passOptionalAny(optional any arg);
|
void passOptionalAny(optional any arg);
|
||||||
void passOptionalObject(optional object arg);
|
void passOptionalObject(optional object arg);
|
||||||
void passOptionalCallbackFunction(optional Function fun);
|
void passOptionalCallbackFunction(optional Function fun);
|
||||||
|
@ -281,6 +304,9 @@ interface TestBinding {
|
||||||
void passOptionalNullableObject(optional object? arg);
|
void passOptionalNullableObject(optional object? arg);
|
||||||
void passOptionalNullableUnion(optional (HTMLElement or long)? arg);
|
void passOptionalNullableUnion(optional (HTMLElement or long)? arg);
|
||||||
void passOptionalNullableUnion2(optional (Event or DOMString)? data);
|
void passOptionalNullableUnion2(optional (Event or DOMString)? data);
|
||||||
|
void passOptionalNullableUnion3(optional (DOMString or sequence<long>)? arg);
|
||||||
|
void passOptionalNullableUnion4(optional (sequence<long> or boolean)? data);
|
||||||
|
void passOptionalNullableUnion5(optional (unsigned long or boolean)? bool);
|
||||||
void passOptionalNullableCallbackFunction(optional Function? fun);
|
void passOptionalNullableCallbackFunction(optional Function? fun);
|
||||||
void passOptionalNullableCallbackInterface(optional EventListener? listener);
|
void passOptionalNullableCallbackInterface(optional EventListener? listener);
|
||||||
void passOptionalNullableSequence(optional sequence<long>? seq);
|
void passOptionalNullableSequence(optional sequence<long>? seq);
|
||||||
|
@ -362,6 +388,9 @@ interface TestBinding {
|
||||||
void passVariadicUnion((HTMLElement or long)... args);
|
void passVariadicUnion((HTMLElement or long)... args);
|
||||||
void passVariadicUnion2((Event or DOMString)... args);
|
void passVariadicUnion2((Event or DOMString)... args);
|
||||||
void passVariadicUnion3((Blob or DOMString)... args);
|
void passVariadicUnion3((Blob or DOMString)... args);
|
||||||
|
void passVariadicUnion4((Blob or boolean)... args);
|
||||||
|
void passVariadicUnion5((DOMString or unsigned long)... args);
|
||||||
|
void passVariadicUnion6((unsigned long or boolean)... args);
|
||||||
void passVariadicAny(any... args);
|
void passVariadicAny(any... args);
|
||||||
void passVariadicObject(object... args);
|
void passVariadicObject(object... args);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue