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

Unified Diff: sdk/lib/_internal/lib/js_helper.dart

Issue 19101002: Fix issue 11705: deal with user-defined Function classes that override noSuchMethod, and are being … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « no previous file | tests/corelib/apply3_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/lib/js_helper.dart
===================================================================
--- sdk/lib/_internal/lib/js_helper.dart (revision 24939)
+++ sdk/lib/_internal/lib/js_helper.dart (working copy)
@@ -63,20 +63,20 @@
return res;
}
-createInvocationMirror(String name, internalName, type, arguments,
+createInvocationMirror(String name, internalName, kind, arguments,
argumentNames) {
return new JSInvocationMirror(name,
internalName,
- type,
+ kind,
arguments,
argumentNames);
}
-createUnmangledInvocationMirror(Symbol symbol, internalName, type, arguments,
+createUnmangledInvocationMirror(Symbol symbol, internalName, kind, arguments,
argumentNames) {
return new JSInvocationMirror(symbol,
internalName,
- type,
+ kind,
arguments,
argumentNames);
}
@@ -591,7 +591,12 @@
String selectorName = 'call\$$argumentCount$buffer';
var jsFunction = JS('var', '#[#]', function, selectorName);
if (jsFunction == null) {
- throw new NoSuchMethodError(function, selectorName, arguments, {});
+ return function.noSuchMethod(createUnmangledInvocationMirror(
+ const Symbol('call'),
+ selectorName,
+ JSInvocationMirror.METHOD,
+ arguments,
+ namedArguments == null ? null : namedArguments.keys.toList()));
}
// We bound 'this' to [function] because of how we compile
// closures: escaped local variables are stored and accessed through
« no previous file with comments | « no previous file | tests/corelib/apply3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698