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

Unified Diff: pkg/scheduled_test/lib/scheduled_process.dart

Issue 93143002: Make pkg/stack_trace use stack chains. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « no previous file | pkg/scheduled_test/lib/scheduled_server.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/scheduled_test/lib/scheduled_process.dart
diff --git a/pkg/scheduled_test/lib/scheduled_process.dart b/pkg/scheduled_test/lib/scheduled_process.dart
index 8f91459a70e8d590a1b7153271f69309e4f87120..1d46d464d57daa8e67d885f11f3366ab341ba6ac 100644
--- a/pkg/scheduled_test/lib/scheduled_process.dart
+++ b/pkg/scheduled_test/lib/scheduled_process.dart
@@ -8,6 +8,8 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
+import 'package:stack_trace/stack_trace.dart';
+
import 'scheduled_test.dart';
import 'src/utils.dart';
import 'src/value_future.dart';
@@ -97,12 +99,12 @@ class ScheduledProcess {
_scheduleExceptionCleanup();
var stdoutWithCanceller = _lineStreamWithCanceller(
- _process.then((p) => p.stdout));
+ _process.then((p) => Chain.track(p.stdout)));
_stdoutCanceller = stdoutWithCanceller.last;
_stdoutLog = stdoutWithCanceller.first;
var stderrWithCanceller = _lineStreamWithCanceller(
- _process.then((p) => p.stderr));
+ _process.then((p) => Chain.track(p.stderr)));
_stderrCanceller = stderrWithCanceller.last;
_stderrLog = stderrWithCanceller.first;
@@ -150,10 +152,11 @@ class ScheduledProcess {
workingDirectory = results[2];
environment = results[3];
_updateDescription(executable, arguments);
- return Process.start(executable,
- arguments,
- workingDirectory: workingDirectory,
- environment: environment).then((process) {
+ return Chain.track(
+ Process.start(executable,
+ arguments,
+ workingDirectory: workingDirectory,
+ environment: environment)).then((process) {
process.stdin.encoding = UTF8;
return process;
});
@@ -169,7 +172,7 @@ class ScheduledProcess {
// process is running, we want the schedule to move to the onException
// queue where the process will be killed, rather than blocking the tasks
// queue waiting for the process to exit.
- _process.then((p) => p.exitCode).then((exitCode) {
+ _process.then((p) => Chain.track(p.exitCode)).then((exitCode) {
if (_endExpected) {
exitCodeCompleter.complete(exitCode);
return;
« no previous file with comments | « no previous file | pkg/scheduled_test/lib/scheduled_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698