mirror of
https://github.com/servo/servo.git
synced 2025-06-14 19:34:29 +00:00
Use handleOptional for the union conversion.
Note that unions didn't handle optional arguments correctly before.
This commit is contained in:
parent
1e2be02eb8
commit
b73a87e955
3 changed files with 5 additions and 5 deletions
|
@ -597,7 +597,7 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None,
|
|||
templateBody = handleDefaultNull(templateBody.define(),
|
||||
"None")
|
||||
|
||||
return (templateBody, declType, isOptional, "None" if isOptional else None)
|
||||
return handleOptional(templateBody, declType, isOptional)
|
||||
|
||||
if type.isGeckoInterface():
|
||||
assert not isEnforceRange and not isClamp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue