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

Side by Side Diff: runtime/bin/process_patch.dart

Issue 687163004: Fixes leak in Process.runSync(). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 patch class _WindowsCodePageDecoder { 5 patch class _WindowsCodePageDecoder {
6 /* patch */ static String _decodeBytes(List<int> bytes) 6 /* patch */ static String _decodeBytes(List<int> bytes)
7 native "SystemEncodingToString"; 7 native "SystemEncodingToString";
8 } 8 }
9 9
10 10
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 _stdin._sink._nativeSocket, 444 _stdin._sink._nativeSocket,
445 _stdout._stream._nativeSocket, 445 _stdout._stream._nativeSocket,
446 _stderr._stream._nativeSocket, 446 _stderr._stream._nativeSocket,
447 _exitHandler._nativeSocket); 447 _exitHandler._nativeSocket);
448 448
449 getOutput(output, encoding) { 449 getOutput(output, encoding) {
450 if (encoding == null) return output; 450 if (encoding == null) return output;
451 return encoding.decode(output); 451 return encoding.decode(output);
452 } 452 }
453 453
454 _processes.remove(_serviceId);
455
454 return new _ProcessResult( 456 return new _ProcessResult(
455 result[0], 457 result[0],
456 result[1], 458 result[1],
457 getOutput(result[2], stdoutEncoding), 459 getOutput(result[2], stdoutEncoding),
458 getOutput(result[3], stderrEncoding)); 460 getOutput(result[3], stderrEncoding));
459 } 461 }
460 462
461 bool _startNative(String path, 463 bool _startNative(String path,
462 List<String> arguments, 464 List<String> arguments,
463 String workingDirectory, 465 String workingDirectory,
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 const _ProcessResult(int this.pid, 593 const _ProcessResult(int this.pid,
592 int this.exitCode, 594 int this.exitCode,
593 this.stdout, 595 this.stdout,
594 this.stderr); 596 this.stderr);
595 597
596 final int pid; 598 final int pid;
597 final int exitCode; 599 final int exitCode;
598 final stdout; 600 final stdout;
599 final stderr; 601 final stderr;
600 } 602 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698