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

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

Issue 10379010: Properly count number of arguments for statics. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 | « no previous file | tests/dom/dom.status » ('j') | 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 bf39e97b69d150aefe7a33f457280f1610f1d563..c9fa55817a2b44f66ce8eca8cf639abf6378f7a0 100644
--- a/lib/dom/scripts/systemnative.py
+++ b/lib/dom/scripts/systemnative.py
@@ -576,7 +576,7 @@ class NativeImplementationGenerator(systemwrapping.WrappingInterfaceGenerator):
if 'Custom' in info.overloads[0].ext_attrs:
parameters = info.ParametersImplementationDeclaration()
dart_declaration = '%s %s(%s)' % (info.type_name, info.name, parameters)
- argument_count = 1 + len(info.param_infos)
+ argument_count = (0 if info.IsStatic() else 1) + len(info.param_infos)
self._GenerateNativeBinding(info.name, argument_count, dart_declaration,
'Callback', True)
return
@@ -646,7 +646,7 @@ class NativeImplementationGenerator(systemwrapping.WrappingInterfaceGenerator):
argument_list)
is_custom = 'Custom' in operation.ext_attrs
cpp_callback_name = self._GenerateNativeBinding(
- native_name, 1 + len(operation.arguments), dart_declaration, 'Callback',
+ native_name, (0 if operation.is_static else 1) + len(operation.arguments), dart_declaration, 'Callback',
is_custom)
if is_custom:
return
« no previous file with comments | « no previous file | tests/dom/dom.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698