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

Unified Diff: pkg/kernel/lib/text/ast_to_text.dart

Issue 2665723002: Implement canonical name scheme in kernel. (Closed)
Patch Set: Address Kevin's comments Created 3 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 | « pkg/kernel/lib/target/targets.dart ('k') | pkg/kernel/lib/transformations/closure/mock.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/text/ast_to_text.dart
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index 8fa2c67d26984ca5cb5b9f05713201a24da73905..42312c826f673e54065f19abd47234cc9c65327c 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -37,11 +37,15 @@ class Disambiguator<T> {
NameSystem globalDebuggingNames = new NameSystem();
String debugLibraryName(Library node) {
- return node.name ?? globalDebuggingNames.nameLibrary(node);
+ return node == null
+ ? 'null'
+ : node.name ?? globalDebuggingNames.nameLibrary(node);
}
String debugClassName(Class node) {
- return node.name ?? globalDebuggingNames.nameClass(node);
+ return node == null
+ ? 'null'
+ : node.name ?? globalDebuggingNames.nameClass(node);
}
String debugQualifiedClassName(Class node) {
« no previous file with comments | « pkg/kernel/lib/target/targets.dart ('k') | pkg/kernel/lib/transformations/closure/mock.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698