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

Unified Diff: utils/testrunner/layout_test_controller.dart

Issue 11343009: Get rid of 'close' on process. It is very easy to use incorrectly and cut off data from your stream… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 8 years, 2 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
« no previous file with comments | « tools/testing/dart/test_suite.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/testrunner/layout_test_controller.dart
diff --git a/utils/testrunner/layout_test_controller.dart b/utils/testrunner/layout_test_controller.dart
index d8864a3d681f9742033e90df3ffe352f721d561b..8dedf11d1874bc8b451b1afe8216629d617eeca7 100644
--- a/utils/testrunner/layout_test_controller.dart
+++ b/utils/testrunner/layout_test_controller.dart
@@ -129,6 +129,8 @@ runTextLayoutTest(testNum) {
var stdout = new List();
start = new Date.now();
Process.start(drt, [url]).then((process) {
+ // Drain stderr to not leak resources.
+ process.stderr.onData = process.stderr.read;
StringInputStream stdoutStringStream =
new StringInputStream(process.stdout);
stdoutStringStream.onLine = () {
@@ -213,6 +215,8 @@ runPixelLayoutTest(int testNum) {
var stdout = new List();
start = new Date.now();
Process.start(drt, ["$url'-p"]).then((process) {
+ // Drain stderr to not leak resources.
+ process.stderr.onData = process.stderr.read;
ListInputStream stdoutStream = process.stdout;
stdoutStream.onData = () {
if (!stdoutStream.closed) {
« no previous file with comments | « tools/testing/dart/test_suite.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698