Bug 1359269 - Part 2: Add codegen support for attributes on types in WebIDL; r=bzbarsky

Depends on D19733

Differential Revision: https://phabricator.services.mozilla.com/D19734

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Manish Goregaokar 2019-03-02 04:21:22 +00:00
Родитель 0d62c9bcf9
Коммит a3792c37f5
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -4650,6 +4650,12 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
# And we can't both be an object and be null or undefined
assert not isDefinitelyObject or not isNullOrUndefined
# Types can also have extended attributes, copy them over
isClamp = isClamp or type.clamp
isEnforceRange = isEnforceRange or type.enforceRange
if type.treatNullAsEmpty:
treatNullAs = "EmptyString"
# If exceptionCode is not set, we'll just rethrow the exception we got.
# Note that we can't just set failureCode to exceptionCode, because setting
# failureCode will prevent pending exceptions from being set in cases when