OLD | NEW |
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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 } | 191 } |
192 | 192 |
193 _environment = []; | 193 _environment = []; |
194 if (environment == null) { | 194 if (environment == null) { |
195 environment = {}; | 195 environment = {}; |
196 } | 196 } |
197 if (environment is !Map) { | 197 if (environment is !Map) { |
198 throw new ArgumentError("Environment is not a map: $environment"); | 198 throw new ArgumentError("Environment is not a map: $environment"); |
199 } | 199 } |
200 if (identical(true, includeParentEnvironment)) { | 200 if (identical(true, includeParentEnvironment)) { |
201 environment = Platform.environment..addAll(environment); | 201 environment = new Map.from(Platform.environment)..addAll(environment); |
202 } | 202 } |
203 environment.forEach((key, value) { | 203 environment.forEach((key, value) { |
204 if (key is !String || value is !String) { | 204 if (key is !String || value is !String) { |
205 throw new ArgumentError( | 205 throw new ArgumentError( |
206 "Environment key or value is not a string: ($key, $value)"); | 206 "Environment key or value is not a string: ($key, $value)"); |
207 } | 207 } |
208 _environment.add('$key=$value'); | 208 _environment.add('$key=$value'); |
209 }); | 209 }); |
210 | 210 |
211 // stdin going to process. | 211 // stdin going to process. |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 const _ProcessResult(int this.pid, | 532 const _ProcessResult(int this.pid, |
533 int this.exitCode, | 533 int this.exitCode, |
534 this.stdout, | 534 this.stdout, |
535 this.stderr); | 535 this.stderr); |
536 | 536 |
537 final int pid; | 537 final int pid; |
538 final int exitCode; | 538 final int exitCode; |
539 final stdout; | 539 final stdout; |
540 final stderr; | 540 final stderr; |
541 } | 541 } |
OLD | NEW |