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

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

Issue 10021048: Remove need to instantiate Platform and make methods static. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add stable test binaries. Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/platform_impl.dart ('k') | tests/standalone/src/io/DartStdIOPipeTest.dart » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class _ProcessStartStatus { 5 class _ProcessStartStatus {
6 int _errorCode; // Set to OS error code if process start failed. 6 int _errorCode; // Set to OS error code if process start failed.
7 String _errorMessage; // Set to OS error message if process start failed. 7 String _errorMessage; // Set to OS error message if process start failed.
8 } 8 }
9 9
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 throw new IllegalArgumentException("Arguments is not a List: $arguments"); 48 throw new IllegalArgumentException("Arguments is not a List: $arguments");
49 } 49 }
50 int len = arguments.length; 50 int len = arguments.length;
51 _arguments = new ObjectArray<String>(len); 51 _arguments = new ObjectArray<String>(len);
52 for (int i = 0; i < len; i++) { 52 for (int i = 0; i < len; i++) {
53 var arg = arguments[i]; 53 var arg = arguments[i];
54 if (arg is !String) { 54 if (arg is !String) {
55 throw new IllegalArgumentException("Non-string argument: $arg"); 55 throw new IllegalArgumentException("Non-string argument: $arg");
56 } 56 }
57 _arguments[i] = arguments[i]; 57 _arguments[i] = arguments[i];
58 if (new Platform().operatingSystem() == 'windows') { 58 if (Platform.operatingSystem() == 'windows') {
59 _arguments[i] = _windowsArgumentEscape(_arguments[i]); 59 _arguments[i] = _windowsArgumentEscape(_arguments[i]);
60 } 60 }
61 } 61 }
62 62
63 if (options !== null && options.workingDirectory !== null) { 63 if (options !== null && options.workingDirectory !== null) {
64 _workingDirectory = options.workingDirectory; 64 _workingDirectory = options.workingDirectory;
65 if (_workingDirectory is !String) { 65 if (_workingDirectory is !String) {
66 throw new IllegalArgumentException( 66 throw new IllegalArgumentException(
67 "WorkingDirectory is not a String: $_workingDirectory"); 67 "WorkingDirectory is not a String: $_workingDirectory");
68 } 68 }
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 void close() => _process.close(); 396 void close() => _process.close();
397 397
398 Process _process; 398 Process _process;
399 Function _callback; 399 Function _callback;
400 StringBuffer _stdoutBuffer; 400 StringBuffer _stdoutBuffer;
401 StringBuffer _stderrBuffer; 401 StringBuffer _stderrBuffer;
402 int _exitCode; 402 int _exitCode;
403 bool _stdoutClosed = false; 403 bool _stdoutClosed = false;
404 bool _stderrClosed = false; 404 bool _stderrClosed = false;
405 } 405 }
OLDNEW
« no previous file with comments | « runtime/bin/platform_impl.dart ('k') | tests/standalone/src/io/DartStdIOPipeTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698