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

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

Issue 294293003: Allow delegate calls even though the target is not reflectable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: TearoffClosure is superclass of BoundClosure. Created 6 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
« no previous file with comments | « no previous file | sdk/lib/_internal/lib/js_mirrors.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
diff --git a/sdk/lib/_internal/lib/js_helper.dart b/sdk/lib/_internal/lib/js_helper.dart
index 2592a72db5ab0712139849d897bec62e96cb81c3..d4c7fa4ee6b4e7be88e72d69ee40bfd2a424103f 100644
--- a/sdk/lib/_internal/lib/js_helper.dart
+++ b/sdk/lib/_internal/lib/js_helper.dart
@@ -108,10 +108,6 @@ void throwInvalidReflectionError(String memberName) {
"because it is not included in a @MirrorsUsed annotation.");
}
-bool hasReflectableProperty(var jsFunction) {
- return JS('bool', '# in #', JS_GET_NAME("REFLECTABLE"), jsFunction);
-}
-
class JSInvocationMirror implements Invocation {
static const METHOD = 0;
static const GETTER = 1;
@@ -217,14 +213,6 @@ class JSInvocationMirror implements Invocation {
isCatchAll = true;
}
if (JS('bool', 'typeof # == "function"', method)) {
- // TODO(floitsch): bound or tear-off closure does not guarantee that the
- // function is reflectable.
- bool isReflectable = hasReflectableProperty(method) ||
- object is BoundClosure ||
- object is TearOffClosure;
- if (!isReflectable) {
- throwInvalidReflectionError(_symbol_dev.Symbol.getName(memberName));
- }
if (isCatchAll) {
return new CachedCatchAllInvocation(
name, method, isIntercepted, interceptor);
« no previous file with comments | « no previous file | sdk/lib/_internal/lib/js_mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698