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

Unified Diff: pkg/scheduled_test/lib/src/task.dart

Issue 93143002: Make pkg/stack_trace use stack chains. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: more fixes Created 7 years 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
Index: pkg/scheduled_test/lib/src/task.dart
diff --git a/pkg/scheduled_test/lib/src/task.dart b/pkg/scheduled_test/lib/src/task.dart
index 997e806cf8d89138999a5ff9addfc851dda40b7c..5bd52430a584db514ce2113c2d0fc796d65d7630 100644
--- a/pkg/scheduled_test/lib/src/task.dart
+++ b/pkg/scheduled_test/lib/src/task.dart
@@ -61,7 +61,7 @@ class Task {
Future get result => _resultCompleter.future;
final _resultCompleter = new Completer();
- final Trace stackTrace;
+ final Chain stackChain;
Task(fn(), String description, TaskQueue queue)
: this._(fn, description, queue, null, queue.contents.length);
@@ -71,7 +71,7 @@ class Task {
Task._(fn(), this.description, TaskQueue queue, this.parent, this._id)
: queue = queue,
- stackTrace = new Trace.current() {
+ stackChain = new Chain.current() {
this.fn = () {
if (state != TaskState.WAITING) {
throw new StateError("Can't run $state task '$this'.");
@@ -123,12 +123,8 @@ class Task {
String toString() => description == null ? "#$_id" : description;
String toStringWithStackTrace() {
- var result = toString();
- if (stackTrace != null) {
- var stackString = prefixLines(terseTraceString(stackTrace));
- result += "\n\nStack trace:\n$stackString";
- }
- return result;
+ var stackString = prefixLines(terseTraceString(stackChain));
+ return "$this\n\nStack chain:\n$stackString";
}
/// Returns a detailed representation of [queue] with this task highlighted.

Powered by Google App Engine
This is Rietveld 408576698