Index: pkg/polymer/lib/src/declaration.dart |
diff --git a/pkg/polymer/lib/src/declaration.dart b/pkg/polymer/lib/src/declaration.dart |
index afe69021ffd3f1d6d00b8f8997770281247fb564..89e1d049dca7f49afb23e7b9f5e97c776b7fd1d6 100644 |
--- a/pkg/polymer/lib/src/declaration.dart |
+++ b/pkg/polymer/lib/src/declaration.dart |
@@ -490,7 +490,7 @@ class PolymerDeclaration extends HtmlElement { |
if (method is! MethodMirror || method.isStatic |
|| !method.isRegularMethod) continue; |
- for (var meta in _safeGetMetadata(method)) { |
+ for (var meta in method.metadata) { |
if (meta.reflectee is! ObserveProperty) continue; |
if (_observe == null) _observe = new HashMap(); |
@@ -599,19 +599,6 @@ DeclarationMirror _getProperty(ClassMirror cls, Symbol property) { |
return null; |
} |
-List _safeGetMetadata(MethodMirror method) { |
- // TODO(jmesserly): dart2js blows up getting metadata from methods in some |
- // cases. Why does this happen? It seems like the culprit might be named |
- // arguments. Unfortunately even calling method.parameters also |
- // triggers the bug in computeFunctionRti. For now we guard against it |
- // with this check. |
- try { |
- return method.metadata; |
- } catch (e) { |
- return []; |
- } |
-} |
- |
bool _hasSetter(ClassMirror cls, MethodMirror getter) { |
var setterName = new Symbol('${MirrorSystem.getName(getter.simpleName)}='); |
var mirror = cls.declarations[setterName]; |