Chromium Code Reviews| Index: tools/dom/src/native_DOMImplementation.dart |
| diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/native_DOMImplementation.dart |
| index b5b265004120bc9988e895ad2f36412ac168b106..9b1233bab4a4dc3c398841f68dd9517895f23d59 100644 |
| --- a/tools/dom/src/native_DOMImplementation.dart |
| +++ b/tools/dom/src/native_DOMImplementation.dart |
| @@ -43,6 +43,15 @@ class _Utils { |
| return result; |
| } |
| + static List parseStackTrace(StackTrace stackTrace) { |
|
Anton Muhin
2013/04/29 07:55:53
regexp woodoo looks a bit hacky, maybe ask VM team
podivilov
2013/04/29 08:29:09
There's currently no public API in StackTrace. VM
|
| + final regExp = new RegExp(r'#\d\s+(.*) \((.*):(\d+):(\d+)\)'); |
| + List result = []; |
| + for (var match in regExp.allMatches(stackTrace.toString())) { |
| + result.add([match.group(1), match.group(2), int.parse(match.group(3)), int.parse(match.group(4))]); |
| + } |
| + return result; |
| + } |
| + |
| static void populateMap(Map result, List list) { |
| for (int i = 0; i < list.length; i += 2) { |
| result[list[i]] = list[i + 1]; |