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

Unified Diff: lib/src/frame.dart

Issue 1288573002: Properly parse native-code V8 frames. (Closed) Base URL: git@github.com:dart-lang/stack_trace@master
Patch Set: Created 5 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 | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/frame.dart
diff --git a/lib/src/frame.dart b/lib/src/frame.dart
index 476b39c88afc16829cda84a0c0996683b79f0932..a5fd6ae2df0554ceb4a7dba0ce0ef6733db1d9b5 100644
--- a/lib/src/frame.dart
+++ b/lib/src/frame.dart
@@ -13,6 +13,7 @@ import 'trace.dart';
// #1 Foo._bar (file:///home/nweiz/code/stuff.dart)
final _vmFrame = new RegExp(r'^#\d+\s+(\S.*) \((.+?)((?::\d+){0,2})\)$');
+// at Object.stringify (native)
// at VW.call$0 (http://pub.dartlang.org/stuff.dart.js:560:28)
// at VW.call$0 (eval as fn
// (http://pub.dartlang.org/stuff.dart.js:560:28), efn:3:28)
@@ -21,7 +22,7 @@ final _v8Frame = new RegExp(
r'^\s*at (?:(\S.*?)(?: \[as [^\]]+\])? \((.*)\)|(.*))$');
// http://pub.dartlang.org/stuff.dart.js:560:28
-final _v8UrlLocation = new RegExp(r'^(.*):(\d+):(\d+)$');
+final _v8UrlLocation = new RegExp(r'^(.*):(\d+):(\d+)|native$');
// eval as function (http://pub.dartlang.org/stuff.dart.js:560:28), efn:3:28
// eval as function (http://pub.dartlang.org/stuff.dart.js:560:28)
@@ -166,6 +167,10 @@ class Frame {
evalMatch = _v8EvalLocation.firstMatch(location);
}
+ if (location == 'native') {
+ return new Frame(Uri.parse('native'), null, null, member);
+ }
+
var urlMatch = _v8UrlLocation.firstMatch(location);
if (urlMatch == null) {
throw new FormatException(
« no previous file with comments | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698