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

Side by Side Diff: pkg/stack_trace/lib/src/frame.dart

Issue 23533074: Support "[as ...]" in V8 stack traces in pkg/stack_trace. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix tests Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/stack_trace/test/frame_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library frame; 5 library frame;
6 6
7 7
8 import 'package:path/path.dart' as path; 8 import 'package:path/path.dart' as path;
9 9
10 import 'trace.dart'; 10 import 'trace.dart';
11 11
12 // #1 Foo._bar (file:///home/nweiz/code/stuff.dart:42:21) 12 // #1 Foo._bar (file:///home/nweiz/code/stuff.dart:42:21)
13 final _vmFrame = new RegExp( 13 final _vmFrame = new RegExp(
14 r'^#\d+\s+([^\s].*) \((.+):(\d+):(\d+)\)$'); 14 r'^#\d+\s+([^\s].*) \((.+):(\d+):(\d+)\)$');
15 15
16 // at VW.call$0 (http://pub.dartlang.org/stuff.dart.js:560:28) 16 // at VW.call$0 (http://pub.dartlang.org/stuff.dart.js:560:28)
17 // at http://pub.dartlang.org/stuff.dart.js:560:28 17 // at http://pub.dartlang.org/stuff.dart.js:560:28
18 final _v8Frame = new RegExp( 18 final _v8Frame = new RegExp(
19 r'^\s*at (?:([^\s].*) \((.+):(\d+):(\d+)\)|(.+):(\d+):(\d+))$'); 19 r'^\s*at (?:([^\s].*?)(?: \[as [^\]]+\])? '
20 r'\((.+):(\d+):(\d+)\)|(.+):(\d+):(\d+))$');
20 21
21 // .VW.call$0@http://pub.dartlang.org/stuff.dart.js:560 22 // .VW.call$0@http://pub.dartlang.org/stuff.dart.js:560
22 // .VW.call$0("arg")@http://pub.dartlang.org/stuff.dart.js:560 23 // .VW.call$0("arg")@http://pub.dartlang.org/stuff.dart.js:560
23 // .VW.call$0/name<@http://pub.dartlang.org/stuff.dart.js:560 24 // .VW.call$0/name<@http://pub.dartlang.org/stuff.dart.js:560
24 final _firefoxFrame = new RegExp( 25 final _firefoxFrame = new RegExp(
25 r'^([^@(/]*)(?:\(.*\))?(/[^<]*<?)?(?:\(.*\))?@(.*):(\d+)$'); 26 r'^([^@(/]*)(?:\(.*\))?(/[^<]*<?)?(?:\(.*\))?@(.*):(\d+)$');
26 27
27 // foo/bar.dart 10:11 in Foo._bar 28 // foo/bar.dart 10:11 in Foo._bar
28 // http://dartlang.org/foo/bar.dart in Foo._bar 29 // http://dartlang.org/foo/bar.dart in Foo._bar
29 final _friendlyFrame = new RegExp( 30 final _friendlyFrame = new RegExp(
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 185
185 var line = match[2] == null ? null : int.parse(match[2]); 186 var line = match[2] == null ? null : int.parse(match[2]);
186 var column = match[3] == null ? null : int.parse(match[3]); 187 var column = match[3] == null ? null : int.parse(match[3]);
187 return new Frame(uri, line, column, match[4]); 188 return new Frame(uri, line, column, match[4]);
188 } 189 }
189 190
190 Frame(this.uri, this.line, this.column, this.member); 191 Frame(this.uri, this.line, this.column, this.member);
191 192
192 String toString() => '$location in $member'; 193 String toString() => '$location in $member';
193 } 194 }
OLDNEW
« no previous file with comments | « no previous file | pkg/stack_trace/test/frame_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698