Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2207)

Unified Diff: client/dom/scripts/systemnative.py

Issue 9432024: Do not rename idl types to dart types at top level - this info is needed for native bindings genera… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update html frog system. Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/dom/scripts/systeminterface.py ('k') | client/dom/scripts/systemwrapping.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « client/dom/scripts/systeminterface.py ('k') | client/dom/scripts/systemwrapping.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698