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

Unified Diff: pkg/compiler/lib/src/apiimpl.dart

Issue 1205373002: Translate package URIs to resource URIs for diagnostics. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 | tests/compiler/dart2js/memory_compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/apiimpl.dart
diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart
index a36ee9ab9ba9beb8328e606bbd9292d64c67769c..a7c937abe1c5f12ef7f7beecca6da79710ceb754 100644
--- a/pkg/compiler/lib/src/apiimpl.dart
+++ b/pkg/compiler/lib/src/apiimpl.dart
@@ -423,7 +423,13 @@ class Compiler extends leg.Compiler {
if (span == null || span.uri == null) {
callUserHandler(null, null, null, '$message', kind);
} else {
- callUserHandler(span.uri, span.begin, span.end, '$message', kind);
+ // Translate uri into a resource uri if possible.
+ Uri uri = translateUri(null, span.uri);
ahe 2015/06/26 07:56:05 If I understand this correctly, this may invoke a
Johnni Winther 2015/06/26 10:15:06 Good point. Will cache the resource URIs.
Johnni Winther 2015/06/26 17:06:54 No need for extra caching; it was already in Scrip
+ if (uri == null) {
+ // Use readable uri as fallback.
+ uri = span.uri;
+ }
+ callUserHandler(uri, span.begin, span.end, '$message', kind);
}
}
« no previous file with comments | « no previous file | tests/compiler/dart2js/memory_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698