Chromium Code Reviews| Index: test/vm_test.dart |
| diff --git a/test/vm_test.dart b/test/vm_test.dart |
| index 947f14bd7b53456114cadbdd6690b38885a3d8c5..ad6c1dd148c4be137cce8824d40c0d0e45b114e5 100644 |
| --- a/test/vm_test.dart |
| +++ b/test/vm_test.dart |
| @@ -12,21 +12,9 @@ import 'package:path/path.dart' as path; |
| import 'package:stack_trace/stack_trace.dart'; |
| import 'package:test/test.dart'; |
| -String getStackTraceString() { |
| - try { |
| - throw ''; |
| - } catch (_, stackTrace) { |
| - return stackTrace.toString(); |
| - } |
| -} |
| +String getStackTraceString() => StackTrace.current.toString(); |
| -StackTrace getStackTraceObject() { |
| - try { |
| - throw ''; |
| - } catch (_, stackTrace) { |
| - return stackTrace; |
| - } |
| -} |
| +StackTrace getStackTraceObject() => StackTrace.current; |
|
nweiz
2016/02/01 19:56:29
Just replace the call sites for these functions.
kevmoo
2016/02/01 22:20:07
Done.
|
| Frame getCaller([int level]) { |
| if (level == null) return new Frame.caller(); |