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

Unified Diff: packages/stack_trace/lib/src/trace.dart

Issue 1521693002: Roll Observatory deps (charted -> ^0.3.0) (Closed) Base URL: https://chromium.googlesource.com/external/github.com/dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years 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 | « packages/stack_trace/lib/src/chain.dart ('k') | packages/stack_trace/lib/src/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/stack_trace/lib/src/trace.dart
diff --git a/packages/stack_trace/lib/src/trace.dart b/packages/stack_trace/lib/src/trace.dart
index f615cd26abc67852db2cbc323f4007aa916e4318..7f2c662b56e57b6cc10115bffc90a64693c24233 100644
--- a/packages/stack_trace/lib/src/trace.dart
+++ b/packages/stack_trace/lib/src/trace.dart
@@ -111,7 +111,8 @@ class Trace implements StackTrace {
/// Parses a string representation of a stack trace.
///
/// [trace] should be formatted in the same way as a Dart VM or browser stack
- /// trace.
+ /// trace. If it's formatted as a stack chain, this will return the equivalent
+ /// of [Chain.toTrace].
factory Trace.parse(String trace) {
try {
if (trace.isEmpty) return new Trace(<Frame>[]);
@@ -120,6 +121,7 @@ class Trace implements StackTrace {
if (trace.contains(_firefoxSafariTrace)) {
return new Trace.parseFirefox(trace);
}
+ if (trace.contains(chainGap)) return new Chain.parse(trace).toTrace();
if (trace.contains(_friendlyTrace)) {
return new Trace.parseFriendly(trace);
}
« no previous file with comments | « packages/stack_trace/lib/src/chain.dart ('k') | packages/stack_trace/lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698