mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Add support for dictionaries containing 'any'.
This commit is contained in:
parent
b193767350
commit
90f4d256cf
2 changed files with 3 additions and 4 deletions
|
@ -765,10 +765,6 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None,
|
|||
if type.isAny():
|
||||
assert not isEnforceRange and not isClamp
|
||||
|
||||
if isMember:
|
||||
raise TypeError("Can't handle member 'any'; need to sort out "
|
||||
"rooting issues")
|
||||
|
||||
declType = CGGeneric("JSVal")
|
||||
value = CGGeneric("${val}")
|
||||
if isOptional:
|
||||
|
@ -4236,6 +4232,8 @@ class CGDictionary(CGThing):
|
|||
return '~""'
|
||||
elif ty.startswith("Option"):
|
||||
return "None"
|
||||
elif ty == "JSVal":
|
||||
return "UndefinedValue()"
|
||||
else:
|
||||
return "/* uh oh: %s */" % ty
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue