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

Unified Diff: sdk/lib/_internal/compiler/implementation/dump_info.dart

Issue 392873002: Element-model refactoring. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 5 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
Index: sdk/lib/_internal/compiler/implementation/dump_info.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dump_info.dart b/sdk/lib/_internal/compiler/implementation/dump_info.dart
index de41e9bb0d38d486c07471ac331334a094cb103c..9c193324186faed70b236048f0936303d6b842f6 100644
--- a/sdk/lib/_internal/compiler/implementation/dump_info.dart
+++ b/sdk/lib/_internal/compiler/implementation/dump_info.dart
@@ -311,12 +311,13 @@ class ElementToJsonVisitor extends ElementVisitor<Map<String, dynamic>> {
code = emittedCode.getText();
size += code.length;
}
-
- for (Element closure in element.nestedClosures) {
- Map<String, dynamic> child = this.process(closure);
- if (child != null) {
- children.add(child['id']);
- size += child['size'];
+ if (element is MethodElement) {
+ for (Element closure in element.nestedClosures) {
+ Map<String, dynamic> child = this.process(closure);
+ if (child != null) {
+ children.add(child['id']);
+ size += child['size'];
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698