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

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

Issue 13157004: Use the stack_trace library in scheduled_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 7 years, 9 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/scheduled_test/pubspec.yaml ('k') | pkg/stack_trace/lib/src/trace.dart » ('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 5f0777c16188d990b16daae0bd4817187cfc8244..f05b4692809529cb5b4f4771176e581c176933c7 100644
--- a/pkg/stack_trace/lib/src/frame.dart
+++ b/pkg/stack_trace/lib/src/frame.dart
@@ -46,6 +46,13 @@ class Frame {
return path.relative(fileUriToPath(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.
+ String get package {
+ if (uri.scheme != 'package') return null;
+ return uri.path.split('/').first;
+ }
+
/// A human-friendly description of the code location.
///
/// For Dart core libraries, this will omit the line and column information,
« no previous file with comments | « pkg/scheduled_test/pubspec.yaml ('k') | pkg/stack_trace/lib/src/trace.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698