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

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

Issue 23567019: Change how we generate bound closures to handler boud closures due to super getters: we need to pas… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | « sdk/lib/_internal/lib/js_helper.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/lib/js_mirrors.dart
===================================================================
--- sdk/lib/_internal/lib/js_mirrors.dart (revision 27518)
+++ sdk/lib/_internal/lib/js_mirrors.dart (working copy)
@@ -279,7 +279,7 @@
if (mirror is JsMethodMirror) {
JsMethodMirror method = mirror;
if (!method.canInvokeReflectively()) {
- throwInvalidReflectionError(memberName);
+ throwInvalidReflectionError(n(memberName));
}
}
return reflect(mirror._invoke(positionalArguments, namedArguments));
@@ -1063,7 +1063,7 @@
this, memberName, positionalArguments, namedArguments);
}
if (!mirror.canInvokeReflectively()) {
- throwInvalidReflectionError(memberName);
+ throwInvalidReflectionError(n(memberName));
}
return reflect(mirror._invoke(positionalArguments, namedArguments));
}
@@ -1221,14 +1221,17 @@
throw new RuntimeError('Cannot find callName on "$reflectee"');
}
int parameterCount = int.parse(callName.split(r'$')[1]);
- bool isStatic = true; // TODO(ahe): Compute isStatic correctly.
if (reflectee is BoundClosure) {
var target = BoundClosure.targetOf(reflectee);
var self = BoundClosure.selfOf(reflectee);
- cachedFunction = new JsMethodMirror(
- s(target), JS('', '#[#]', self, target), parameterCount,
- false, false, isStatic, false, false);
+ var name = mangledNames[BoundClosure.nameOf(reflectee)];
+ if (name == null) {
+ throwInvalidReflectionError(name);
+ }
+ cachedFunction = new JsMethodMirror.fromUnmangledName(
+ name, target, false, false);
} else {
+ bool isStatic = true; // TODO(ahe): Compute isStatic correctly.
var jsFunction = JS('', '#[#]', reflectee, callName);
cachedFunction = new JsMethodMirror(
s(callName), jsFunction, parameterCount,
« no previous file with comments | « sdk/lib/_internal/lib/js_helper.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698