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

Unified Diff: lib/compiler/implementation/compiler.dart

Issue 10701091: Dartdoc and Apidoc updated to use dart2js through the mirror system. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed cf. rnystrom's comments. Created 8 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: lib/compiler/implementation/compiler.dart
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
index ef6ae15e0daa9ad80309eb28ce0ef37acf9cf4ec..6b130e442bb074e78040abd5a662f3bb11e6d8d2 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -977,7 +977,7 @@ class Compiler implements DiagnosticListener {
// URI.
throw 'Cannot find tokens to produce error message.';
}
- if (uri === null) {
+ if (uri === null && currentElement !== null) {
ahe 2012/08/02 19:56:23 currentElement may not be null.
uri = currentElement.getCompilationUnit().script.uri;
}
return SourceSpan.withCharacterOffsets(begin, end,
@@ -1089,4 +1089,6 @@ class SourceSpan {
assert(endOffset >= beginOffset);
return f(beginOffset, endOffset);
}
+
+ String toString() => 'SourceSpan($uri, $begin, $end)';
}

Powered by Google App Engine
This is Rietveld 408576698