Chromium Code Reviews| Index: pkg/stack_trace/lib/src/trace.dart |
| diff --git a/pkg/stack_trace/lib/src/trace.dart b/pkg/stack_trace/lib/src/trace.dart |
| index 19f0a12c52f307c111fc29999eabcec1b674cc2b..5306501f50cc01408694b0028d8293ba3d46ee61 100644 |
| --- a/pkg/stack_trace/lib/src/trace.dart |
| +++ b/pkg/stack_trace/lib/src/trace.dart |
| @@ -19,8 +19,14 @@ final _terseRegExp = new RegExp(r"(-patch)?(/.*)?$"); |
| /// V8's traces start with a line that's either just "Error" or else is a |
| /// description of the exception that occurred. That description can be multiple |
| /// lines, so we just look for any line other than the first that begins with |
| -/// four spaces and "at". |
| -final _v8Trace = new RegExp(r"\n at "); |
| +/// three or four spaces and "at". |
| +final _v8Trace = new RegExp(r"\n\s{3,4}at "); |
|
nweiz
2013/08/27 18:16:06
\s isn't ideal here, since it can also match tabs.
blois
2013/08/27 18:20:30
Done.
|
| + |
| +/// A RegExp to match indidual lines of V8's stack traces. |
| +/// |
| +/// This is intended to filter out the leading exception details of the trace |
| +/// though it is possible for the message to match this as well. |
| +final _v8TraceLine = new RegExp(r"\s{3,4}at "); |
| /// A RegExp to match Firefox's stack traces. |
| /// |
| @@ -106,16 +112,9 @@ class Trace implements StackTrace { |
| // It's possible that an Exception's description contains a line that |
| // looks like a V8 trace line, which will screw this up. |
| // Unfortunately, that's impossible to detect. |
| - .skipWhile((line) => !line.startsWith(" at ")) |
| + .skipWhile((line) => !line.startsWith(_v8TraceLine)) |
| .map((line) => new Frame.parseV8(line))); |
| - /// Parses a string representation of an Internet Explorer stack trace. |
| - /// |
| - /// IE10+ traces look just like V8 traces. Prior to IE10, stack traces can't |
| - /// be retrieved. |
| - Trace.parseIE(String trace) |
| - : this.parseV8(trace); |
|
nweiz
2013/08/27 18:16:06
This should be retained.
blois
2013/08/27 18:20:30
Done.
|
| - |
| /// Parses a string representation of a Firefox stack trace. |
| Trace.parseFirefox(String trace) |
| : this(trace.trim().split("\n") |