mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
Use handleOptional for the enumeration conversion.
This commit is contained in:
parent
13e26e0fe0
commit
89d4fac36e
3 changed files with 3 additions and 3 deletions
|
@ -722,7 +722,7 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None,
|
|||
(enum,
|
||||
getEnumValueName(defaultValue.value))))
|
||||
|
||||
return (template, CGGeneric(enum), isOptional, None)
|
||||
return handleOptional(template, CGGeneric(enum), isOptional)
|
||||
|
||||
if type.isCallback():
|
||||
assert not isEnforceRange and not isClamp
|
||||
|
|
|
@ -127,7 +127,7 @@ impl TestBinding {
|
|||
pub fn PassOptionalFloat(&self, _: Option<f32>) {}
|
||||
pub fn PassOptionalDouble(&self, _: Option<f64>) {}
|
||||
pub fn PassOptionalString(&self, _: Option<DOMString>) {}
|
||||
// pub fn PassOptionalEnum(&self, _: Option<TestEnum>) {}
|
||||
pub fn PassOptionalEnum(&self, _: Option<TestEnum>) {}
|
||||
pub fn PassOptionalInterface(&self, _: Option<JS<Blob>>) {}
|
||||
pub fn PassOptionalUnion(&self, _: Option<HTMLElementOrLong>) {}
|
||||
pub fn PassOptionalAny(&self, _: *JSContext, _: Option<JSVal>) {}
|
||||
|
|
|
@ -132,7 +132,7 @@ interface TestBinding {
|
|||
void passOptionalFloat(optional float arg);
|
||||
void passOptionalDouble(optional double arg);
|
||||
void passOptionalString(optional DOMString arg);
|
||||
// void passOptionalEnum(optional TestEnum arg);
|
||||
void passOptionalEnum(optional TestEnum arg);
|
||||
void passOptionalInterface(optional Blob arg);
|
||||
void passOptionalUnion(optional (HTMLElement or long) arg);
|
||||
void passOptionalAny(optional any arg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue