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

Unified Diff: sdk/lib/_internal/dartdoc/lib/universe_serializer.dart

Issue 63483002: Fix some users of removed mirror API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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
Index: sdk/lib/_internal/dartdoc/lib/universe_serializer.dart
diff --git a/sdk/lib/_internal/dartdoc/lib/universe_serializer.dart b/sdk/lib/_internal/dartdoc/lib/universe_serializer.dart
index ba57411423e135d15c2f361a40f7304c9b14e84a..fc1b0aa78352c6a8c9382cfa7e4f57bb719d662c 100755
--- a/sdk/lib/_internal/dartdoc/lib/universe_serializer.dart
+++ b/sdk/lib/_internal/dartdoc/lib/universe_serializer.dart
@@ -312,23 +312,35 @@ class ClassElement extends Element {
this.interfaces.add(_optionalReference(interface));
}
- mirror.methods.forEach((childName, childMirror) {
+ mirror.declarations.values
+ .where((d) => d is MethodMirror))
+ .forEach((childMirror) {
if (!childMirror.isConstructor && !childMirror.isGetter) {
+ var childName = childMirror.simpleName;
addChild(new MethodElement(childName, childMirror, lookupMdnComment));
}
});
- mirror.getters.forEach((childName, childMirror) {
+ mirror.declarations.values
+ .where((d) => d is MethodMirror && d.isGetter))
+ .forEach((childMirror) {
+ var childName = childMirror.simpleName;
addChild(new GetterElement(childName, childMirror, lookupMdnComment));
});
- mirror.variables.forEach((childName, childMirror) {
- addChild(new VariableElement(childName, childMirror,
- lookupMdnComment));
+ mirror.declarations.values
+ .where((d) => d is VariableMirror))
+ .forEach((childMirror) {
+ var childName = childMirror.simpleName;
+ addChild(new VariableElement(childName, childMirror,
+ lookupMdnComment));
});
- mirror.constructors.forEach((constructorName, methodMirror) {
- addChild(new MethodElement(constructorName, methodMirror,
+ mirror.declarations.values
+ .where((d) => d is MethodMirror && d.isConstructor))
+ .forEach((childMirror) {
+ var childName = childMirror.simpleName;
+ addChild(new MethodElement(childName, methodMirror,
lookupMdnComment, 'constructor'));
});

Powered by Google App Engine
This is Rietveld 408576698