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

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

Issue 10827046: Split to dart conversion and argument expression logic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | « lib/dom/scripts/generator.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/systemnative.py
diff --git a/lib/dom/scripts/systemnative.py b/lib/dom/scripts/systemnative.py
index 8a8874ace76448b040f99e81878ffc43dc39fcec..48edc4fba8ff114273d8a7cb51f7f77002327113 100644
--- a/lib/dom/scripts/systemnative.py
+++ b/lib/dom/scripts/systemnative.py
@@ -802,15 +802,14 @@ class NativeImplementationGenerator(systembase.BaseGenerator):
for i, argument in enumerate(arguments):
type_info = self._TypeInfo(argument.type.id)
self._cpp_impl_includes |= set(type_info.to_native_includes())
- cpp_arguments.append(type_info.emit_to_native(
+ argument_name = DartDomNameOfAttribute(argument)
+ type_info.emit_to_native(
body_emitter,
argument,
(IsOptional(argument) and not self._IsArgumentOptionalInWebCore(node, argument)) or (argument.ext_attrs.get('Optional') == 'DefaultIsNullString'),
- # TODO(antonm): all IDs should be renamed when database is generated.
- # That will allow to get rid of argument_name argument altogether.
- DartDomNameOfAttribute(argument),
- 'Dart_GetNativeArgument(args, %i)' % (start_index + i),
- self._interface.id))
+ argument_name,
+ 'Dart_GetNativeArgument(args, %i)' % (start_index + i))
+ cpp_arguments.append(type_info.argument_expression(argument_name, self._interface.id))
body_emitter.Emit('\n')
« no previous file with comments | « lib/dom/scripts/generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698