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

Unified Diff: dart/lib/compiler/implementation/native_emitter.dart

Issue 10441071: Use the typedef arity to know how to invoke a closure given by the dom. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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
Index: dart/lib/compiler/implementation/native_emitter.dart
===================================================================
--- dart/lib/compiler/implementation/native_emitter.dart (revision 8060)
+++ dart/lib/compiler/implementation/native_emitter.dart (working copy)
@@ -177,7 +177,8 @@
Type type = parameter.computeType(compiler);
if (type is FunctionType) {
String name = parameter.name.slowToString();
- code.add(' $name = $closureConverter($name);\n');
+ int arity = type.computeArity();
+ code.add(' $name = $closureConverter($name, $arity);\n');
}
});
}
« no previous file with comments | « dart/lib/compiler/implementation/lib/js_helper.dart ('k') | dart/lib/compiler/implementation/native_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698