mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +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():
|
if type.isAny():
|
||||||
assert not isEnforceRange and not isClamp
|
assert not isEnforceRange and not isClamp
|
||||||
|
|
||||||
if isMember:
|
|
||||||
raise TypeError("Can't handle member 'any'; need to sort out "
|
|
||||||
"rooting issues")
|
|
||||||
|
|
||||||
declType = CGGeneric("JSVal")
|
declType = CGGeneric("JSVal")
|
||||||
value = CGGeneric("${val}")
|
value = CGGeneric("${val}")
|
||||||
if isOptional:
|
if isOptional:
|
||||||
|
@ -4236,6 +4232,8 @@ class CGDictionary(CGThing):
|
||||||
return '~""'
|
return '~""'
|
||||||
elif ty.startswith("Option"):
|
elif ty.startswith("Option"):
|
||||||
return "None"
|
return "None"
|
||||||
|
elif ty == "JSVal":
|
||||||
|
return "UndefinedValue()"
|
||||||
else:
|
else:
|
||||||
return "/* uh oh: %s */" % ty
|
return "/* uh oh: %s */" % ty
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ dictionary TestDictionaryDefaults {
|
||||||
// double doubleValue = 7.0;
|
// double doubleValue = 7.0;
|
||||||
DOMString stringValue = "";
|
DOMString stringValue = "";
|
||||||
// TestEnum enumValue = "bar";
|
// TestEnum enumValue = "bar";
|
||||||
|
any anyValue = null;
|
||||||
|
|
||||||
// boolean? nullableBooleanValue = false;
|
// boolean? nullableBooleanValue = false;
|
||||||
// byte? nullableByteValue = 7;
|
// byte? nullableByteValue = 7;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue