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

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

Issue 28783006: Properly parse friendly stack traces without columns. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Firefox fixes Created 7 years, 2 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 | 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 797bef173ba1a6623bb1942ca3b4ad6a3c0076cf..45bef4d88e82c2316f4c391be5a89bd6039e59d4 100644
--- a/pkg/stack_trace/lib/src/frame.dart
+++ b/pkg/stack_trace/lib/src/frame.dart
@@ -23,7 +23,7 @@ final _v8Frame = new RegExp(
// .VW.call$0("arg")@http://pub.dartlang.org/stuff.dart.js:560
// .VW.call$0/name<@http://pub.dartlang.org/stuff.dart.js:560
final _firefoxFrame = new RegExp(
- r'^([^@(/]*)(?:\(.*\))?(/[^<]*<?)?(?:\(.*\))?@(.*):(\d+)$');
+ r'^([^@(/]*)(?:\(.*\))?((?:/[^/]*)*)(?:\(.*\))?@(.*):(\d+)$');
// foo/bar.dart 10:11 in Foo._bar
// http://dartlang.org/foo/bar.dart in Foo._bar
@@ -159,11 +159,9 @@ class Frame {
var uri = Uri.parse(match[3]);
var member = match[1];
- if (member == "") {
- member = "<fn>";
- } else if (match[2] != null) {
- member = "$member.<fn>";
- }
+ member += new List.filled('/'.allMatches(match[2]).length, ".<fn>").join();
+ if (member == '') member = '<fn>';
+
// Some Firefox members have initial dots. We remove them for consistency
// with other platforms.
member = member.replaceFirst(_initialDot, '');
« no previous file with comments | « no previous file | pkg/stack_trace/lib/src/trace.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698