Use handleOptional for the union conversion.

Note that unions didn't handle optional arguments correctly before.
This commit is contained in:
Ms2ger 2014-04-26 17:22:07 +02:00
parent 1e2be02eb8
commit b73a87e955
3 changed files with 5 additions and 5 deletions

View file

@ -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