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

Unified Diff: pkg/polymer/lib/src/declaration.dart

Issue 165373007: remove workaround for MethodMirror.metadata (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698