Properly parse native-code V8 frames.

Fixes dart-lang/test#316.

R=rnystrom@google.com

Review URL: https://codereview.chromium.org//1288573002 .
diff --git a/.gitignore b/.gitignore
index 388eff0..7dbf035 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
 .pub/
 build/
 packages
+.packages
 
 # Or the files created by dart2js.
 *.dart.js
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c660d82..1d4eaae 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 1.3.6
+
+* Properly parse native-code V8 frames.
+
 ## 1.3.5
 
 * Properly shorten library names for pathnames of folded frames on Windows.
diff --git a/lib/src/frame.dart b/lib/src/frame.dart
index 476b39c..a5fd6ae 100644
--- a/lib/src/frame.dart
+++ b/lib/src/frame.dart
@@ -13,6 +13,7 @@
 // #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 @@
     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 @@
         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(
diff --git a/pubspec.yaml b/pubspec.yaml
index 5a61175..6e233cd 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -7,7 +7,7 @@
 #
 # When the major version is upgraded, you *must* update that version constraint
 # in pub to stay in sync with this.
-version: 1.3.5
+version: 1.3.6-dev
 author: "Dart Team <misc@dartlang.org>"
 homepage: http://github.com/dart-lang/stack_trace
 description: >
diff --git a/test/frame_test.dart b/test/frame_test.dart
index 01177f0..809822a 100644
--- a/test/frame_test.dart
+++ b/test/frame_test.dart
@@ -149,6 +149,15 @@
       expect(frame.member, equals('<fn>'));
     });
 
+    test('parses a native stack frame correctly', () {
+      var frame = new Frame.parseV8(
+          "    at Object.stringify (native)");
+      expect(frame.uri, Uri.parse('native'));
+      expect(frame.line, isNull);
+      expect(frame.column, isNull);
+      expect(frame.member, equals('Object.stringify'));
+    });
+
     test('parses a stack frame with [as ...] correctly', () {
       // Ignore "[as ...]", since other stack trace formats don't support a
       // similar construct.