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

Unified Diff: pkg/stack_trace/lib/src/frame.dart

Issue 75543013: Make the stack_trace package print relative URLs for browser paths. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review 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
« no previous file with comments | « pkg/path/lib/path.dart ('k') | pkg/stack_trace/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/stack_trace/lib/src/frame.dart
diff --git a/pkg/stack_trace/lib/src/frame.dart b/pkg/stack_trace/lib/src/frame.dart
index 6a88a268c93a6d09d8064c81090dd9713ace6b7b..74aafcda319f767b59f0ad4dec4552d965115a54 100644
--- a/pkg/stack_trace/lib/src/frame.dart
+++ b/pkg/stack_trace/lib/src/frame.dart
@@ -69,7 +69,8 @@ class Frame {
/// This will usually be the string form of [uri], but a relative URI will be
/// used if possible.
String get library {
- if (uri.scheme != 'file') return uri.toString();
+ if (uri.scheme != Uri.base.scheme) return uri.toString();
+ if (path.style == path.Style.url) return path.relative(uri.toString());
return path.relative(path.fromUri(uri));
}
« no previous file with comments | « pkg/path/lib/path.dart ('k') | pkg/stack_trace/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698