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

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

Issue 15850004: Verify that correct number of arguments was passed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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
« tools/dom/scripts/generator.py ('K') | « tools/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/systemnative.py
diff --git a/tools/dom/scripts/systemnative.py b/tools/dom/scripts/systemnative.py
index fb659f4c81da3904358c664a27421ee0d5acf49c..1417469262d05a3769dd5ff30e3bbfba1a3fd242 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -557,14 +557,15 @@ class DartiumBackend(HtmlDartGenerator):
if not is_custom:
self._GenerateOperationNativeCallback(operation, operation.arguments, cpp_callback_name)
else:
- self._GenerateDispatcher(info.operations, dart_declaration, [info.name for info in info.param_infos])
+ self._GenerateDispatcher(info, info.operations, dart_declaration)
- def _GenerateDispatcher(self, operations, dart_declaration, parameter_names):
+ def _GenerateDispatcher(self, info, operations, dart_declaration):
def GenerateCall(
stmts_emitter, call_emitter, version, operation, argument_count):
overload_name = '_%s_%s' % (operation.id, version)
- argument_list = ', '.join(parameter_names[:argument_count])
+ argument_list = ', '.join(
+ [p.name for p in info.param_infos[:argument_count]])
call_emitter.Emit('$NAME($ARGS)', NAME=overload_name, ARGS=argument_list)
dart_declaration = '%s%s %s(%s)' % (
@@ -577,8 +578,8 @@ class DartiumBackend(HtmlDartGenerator):
self._GenerateOperationNativeCallback(operation, operation.arguments[:argument_count], cpp_callback_name)
self._GenerateDispatcherBody(
+ info,
operations,
- parameter_names,
dart_declaration,
GenerateCall,
self._IsArgumentOptionalInWebCore)
« tools/dom/scripts/generator.py ('K') | « tools/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698