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

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

Issue 23445005: Fixing stack traces on IE10. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..bf14ee2fbfac2e1ae9b241244f96dd72af631082 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 ?at ");
+
+/// 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" ?at ");
/// A RegExp to match Firefox's stack traces.
///
@@ -106,7 +112,7 @@ 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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698