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

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

Issue 298873011: Use path.prettyUri in stack_trace. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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/stack_trace/CHANGELOG.md ('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 67438c37e0bcfd19ca7d0cdf165c0ece143bec3c..5b376e2eee86a97c55a03d96ea8adca573398bdd 100644
--- a/pkg/stack_trace/lib/src/frame.dart
+++ b/pkg/stack_trace/lib/src/frame.dart
@@ -88,11 +88,7 @@ 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 != Uri.base.scheme) return uri.toString();
- if (path.style == path.Style.url) return path.relative(uri.toString());
- return path.relative(path.fromUri(uri));
- }
+ String get library => path.prettyUri(uri);
/// Returns the name of the package this stack frame comes from, or `null` if
/// this stack frame doesn't come from a `package:` URL.
« no previous file with comments | « pkg/stack_trace/CHANGELOG.md ('k') | pkg/stack_trace/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698