mirror of
https://github.com/servo/servo.git
synced 2025-06-15 03:44:30 +00:00
auto merge of #1950 : Ms2ger/servo/nullable-string-with-null-default, r=jdm
This commit is contained in:
commit
54da52fa77
3 changed files with 3 additions and 4 deletions
|
@ -688,8 +688,7 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None,
|
||||||
|
|
||||||
if isinstance(defaultValue, IDLNullValue):
|
if isinstance(defaultValue, IDLNullValue):
|
||||||
assert(type.nullable())
|
assert(type.nullable())
|
||||||
return handleDefault(conversionCode,
|
return handleDefault(conversionCode, "${declName} = None;")
|
||||||
"${declName}.SetNull();")
|
|
||||||
|
|
||||||
value = "str::from_utf8(data).unwrap().to_owned()"
|
value = "str::from_utf8(data).unwrap().to_owned()"
|
||||||
if type.nullable():
|
if type.nullable():
|
||||||
|
|
|
@ -125,7 +125,7 @@ impl TestBinding {
|
||||||
pub fn PassOptionalNullableUnsignedLongLongWithDefault(&self, _: Option<u64>) {}
|
pub fn PassOptionalNullableUnsignedLongLongWithDefault(&self, _: Option<u64>) {}
|
||||||
pub fn PassOptionalNullableFloatWithDefault(&self, _: Option<f32>) {}
|
pub fn PassOptionalNullableFloatWithDefault(&self, _: Option<f32>) {}
|
||||||
pub fn PassOptionalNullableDoubleWithDefault(&self, _: Option<f64>) {}
|
pub fn PassOptionalNullableDoubleWithDefault(&self, _: Option<f64>) {}
|
||||||
// pub fn PassOptionalNullableStringWithDefault(&self, _: Option<DOMString>) {}
|
pub fn PassOptionalNullableStringWithDefault(&self, _: Option<DOMString>) {}
|
||||||
pub fn PassOptionalNullableInterfaceWithDefault(&self, _: Option<JS<Blob>>) {}
|
pub fn PassOptionalNullableInterfaceWithDefault(&self, _: Option<JS<Blob>>) {}
|
||||||
pub fn PassOptionalAnyWithDefault(&self, _: *JSContext, _: JSVal) {}
|
pub fn PassOptionalAnyWithDefault(&self, _: *JSContext, _: JSVal) {}
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ interface TestBinding {
|
||||||
void passOptionalNullableUnsignedLongWithDefault(optional unsigned long? arg = null);
|
void passOptionalNullableUnsignedLongWithDefault(optional unsigned long? arg = null);
|
||||||
void passOptionalNullableLongLongWithDefault(optional long long? arg = null);
|
void passOptionalNullableLongLongWithDefault(optional long long? arg = null);
|
||||||
void passOptionalNullableUnsignedLongLongWithDefault(optional unsigned long long? arg = null);
|
void passOptionalNullableUnsignedLongLongWithDefault(optional unsigned long long? arg = null);
|
||||||
// void passOptionalNullableStringWithDefault(optional DOMString? arg = null);
|
void passOptionalNullableStringWithDefault(optional DOMString? arg = null);
|
||||||
void passOptionalNullableInterfaceWithDefault(optional Blob? arg = null);
|
void passOptionalNullableInterfaceWithDefault(optional Blob? arg = null);
|
||||||
void passOptionalAnyWithDefault(optional any arg = null);
|
void passOptionalAnyWithDefault(optional any arg = null);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue