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

Unified Diff: lib/src/frame.dart

Issue 1320393003: Improve the display of data: URIs in stack traces. (Closed) Base URL: git@github.com:dart-lang/stack_trace@master
Patch Set: Created 5 years, 3 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 | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/frame.dart
diff --git a/lib/src/frame.dart b/lib/src/frame.dart
index 072983a1b3c03ad4a63268fe529fa9eae4e0f267..4077c7cba54318863a6f6799daf5bac5c5f30fcb 100644
--- a/lib/src/frame.dart
+++ b/lib/src/frame.dart
@@ -95,8 +95,11 @@ class Frame {
/// comes from.
///
/// This will usually be the string form of [uri], but a relative URI will be
- /// used if possible.
- String get library => path.prettyUri(uri);
+ /// used if possible. Data URIs will be truncated.
+ String get library {
+ if (uri.scheme == 'data') return "data:...";
+ return 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 | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698