Index: client/dom/scripts/systemnative.py |
diff --git a/client/dom/scripts/systemnative.py b/client/dom/scripts/systemnative.py |
index aa3c22cf08f66b1d368cc57cfc57004cbfb3d8d0..dd8dc7d8a6e728c4743273543f969712f6c1e35d 100644 |
--- a/client/dom/scripts/systemnative.py |
+++ b/client/dom/scripts/systemnative.py |
@@ -299,7 +299,7 @@ class NativeImplementationGenerator(systemwrapping.WrappingInterfaceGenerator): |
' if (!context) {\n' |
' exception = Dart_NewString("Failed to create an object");\n' |
' goto fail;\n' |
- ' }\n') |
+ ' }') |
arguments = ['context'] |
else: |
raise Exception('Unsupported CallWith=%s attribute' % call_with) |
@@ -402,7 +402,8 @@ class NativeImplementationGenerator(systemwrapping.WrappingInterfaceGenerator): |
self._AddSetter(setter) |
def _AddGetter(self, attr): |
- dart_declaration = '%s get %s()' % (attr.type.id, attr.id) |
+ type_info = GetIDLTypeInfo(attr.type) |
+ dart_declaration = '%s get %s()' % (type_info.dart_type(), attr.id) |
is_custom = 'Custom' in attr.ext_attrs or 'CustomGetter' in attr.ext_attrs |
cpp_callback_name = self._GenerateNativeBinding(attr.id, 1, |
dart_declaration, 'Getter', is_custom) |
@@ -439,7 +440,8 @@ class NativeImplementationGenerator(systemwrapping.WrappingInterfaceGenerator): |
raises_dom_exceptions=attr.get_raises) |
def _AddSetter(self, attr): |
- dart_declaration = 'void set %s(%s)' % (attr.id, attr.type.id) |
+ type_info = GetIDLTypeInfo(attr.type) |
+ dart_declaration = 'void set %s(%s)' % (attr.id, type_info.dart_type()) |
is_custom = set(['Custom', 'CustomSetter', 'V8CustomSetter']) & set(attr.ext_attrs) |
cpp_callback_name = self._GenerateNativeBinding(attr.id, 2, |
dart_declaration, 'Setter', is_custom) |
@@ -687,6 +689,7 @@ class NativeImplementationGenerator(systemwrapping.WrappingInterfaceGenerator): |
nested_templates.append( |
' {\n' |
'$PARAMETER_DEFINITIONS' |
+ '\n' |
'$BODY' |
' return;\n' |
' }\n') |
@@ -716,7 +719,7 @@ class NativeImplementationGenerator(systemwrapping.WrappingInterfaceGenerator): |
if needs_receiver: |
template_parameters['PARAMETER_DEFINITIONS'] = emitter.Format( |
' $WEBCORE_CLASS_NAME* receiver = DartDOMWrapper::receiver< $WEBCORE_CLASS_NAME >(args);\n' |
- ' $PARAMETER_DEFINITIONS\n', |
+ '$PARAMETER_DEFINITIONS', |
**template_parameters) |
for template in nested_templates: |