mirror of
https://github.com/servo/servo.git
synced 2025-06-15 20:04:28 +00:00
Fix code generation for a null default value for nullable string arguments.
This commit is contained in:
parent
7bfb15ec62
commit
acffed2dcd
3 changed files with 3 additions and 4 deletions
|
@ -702,8 +702,7 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None,
|
|||
|
||||
if isinstance(defaultValue, IDLNullValue):
|
||||
assert(type.nullable())
|
||||
return handleDefault(conversionCode,
|
||||
"${declName}.SetNull();")
|
||||
return handleDefault(conversionCode, "${declName} = None;")
|
||||
|
||||
value = "str::from_utf8(data).unwrap().to_owned()"
|
||||
if type.nullable():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue