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

Unified Diff: test/vm_test.dart

Issue 1653603002: pkg/stack_trace: Use StackTrace.current (Closed) Base URL: https://github.com/dart-lang/stack_trace.git@master
Patch Set: Created 4 years, 11 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
« pubspec.yaml ('K') | « test/trace_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« pubspec.yaml ('K') | « test/trace_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698