auto merge of #2155 : Ms2ger/servo/dictionary-codegen, r=jdm

This commit is contained in:
bors-servo 2014-04-18 09:40:11 -04:00
commit 099815683d
2 changed files with 48 additions and 7 deletions

View file

@ -702,13 +702,6 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None,
return handleDefault(conversionCode, default)
if isMember:
# We have to make a copy, because our jsval may well not
# live as long as our string needs to.
declType = CGGeneric("DOMString")
return ("%s\n" % getConversionCode(),
declType, None, isOptional, None)
declType = "DOMString"
initialValue = None
if type.nullable():

View file

@ -4,6 +4,54 @@
enum TestEnum { "", "foo", "bar" };
/* dictionary TestDictionary {
// boolean booleanValue;
// byte byteValue;
// octet octetValue;
// short shortValue;
// unsigned short unsignedShortValue;
// long longValue;
// unsigned long unsignedLongValue;
// long long longLongValue;
// unsigned long long unsignedLongLongValue;
// float floatValue;
// double doubleValue;
// DOMString stringValue;
// TestEnum enumValue;
// Blob interfaceValue;
// any anyValue;
}; */
dictionary TestDictionaryDefaults {
// boolean booleanValue = false;
// byte byteValue = 7;
// octet octetValue = 7;
short shortValue = 7;
unsigned short unsignedShortValue = 7;
long longValue = 7;
unsigned long unsignedLongValue = 7;
// long long longLongValue = 7;
// unsigned long long unsignedLongLongValue = 7;
// float floatValue = 7.0;
// double doubleValue = 7.0;
DOMString stringValue = "";
// TestEnum enumValue = "bar";
// boolean? nullableBooleanValue = false;
// byte? nullableByteValue = 7;
// octet? nullableOctetValue = 7;
short? nullableShortValue = 7;
unsigned short? nullableUnsignedShortValue = 7;
long? nullableLongValue = 7;
unsigned long? nullableUnsignedLongValue = 7;
// long long? nullableLongLongValue = 7;
// unsigned long long? nullableUnsignedLongLongValue = 7;
// float? nullableFloatValue = 7.0;
// double? nullableDoubleValue = 7.0;
DOMString? nullableStringValue = "";
// TestEnum? nullableEnumValue = "bar";
};
interface TestBinding {
attribute boolean booleanAttribute;
attribute byte byteAttribute;