OLD | NEW |
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 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 return (bytes[offset] + | 149 return (bytes[offset] + |
150 (bytes[offset + 1] << 8) + | 150 (bytes[offset + 1] << 8) + |
151 (bytes[offset + 2] << 16) + | 151 (bytes[offset + 2] << 16) + |
152 (bytes[offset + 3] << 24)); | 152 (bytes[offset + 3] << 24)); |
153 } | 153 } |
154 | 154 |
155 Future<Process> _start() { | 155 Future<Process> _start() { |
156 var completer = new Completer(); | 156 var completer = new Completer(); |
157 // TODO(ager): Make the actual process starting really async instead of | 157 // TODO(ager): Make the actual process starting really async instead of |
158 // simulating it with a timer. | 158 // simulating it with a timer. |
159 new Timer(0, (_) { | 159 Timer.run(() { |
160 var status = new _ProcessStartStatus(); | 160 var status = new _ProcessStartStatus(); |
161 bool success = _startNative(_path, | 161 bool success = _startNative(_path, |
162 _arguments, | 162 _arguments, |
163 _workingDirectory, | 163 _workingDirectory, |
164 _environment, | 164 _environment, |
165 _stdin._nativeSocket, | 165 _stdin._nativeSocket, |
166 _stdout._nativeSocket, | 166 _stdout._nativeSocket, |
167 _stderr._nativeSocket, | 167 _stderr._nativeSocket, |
168 _exitHandler._nativeSocket, | 168 _exitHandler._nativeSocket, |
169 status); | 169 status); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 | 326 |
327 class _ProcessResult implements ProcessResult { | 327 class _ProcessResult implements ProcessResult { |
328 const _ProcessResult(int this.exitCode, | 328 const _ProcessResult(int this.exitCode, |
329 String this.stdout, | 329 String this.stdout, |
330 String this.stderr); | 330 String this.stderr); |
331 | 331 |
332 final int exitCode; | 332 final int exitCode; |
333 final String stdout; | 333 final String stdout; |
334 final String stderr; | 334 final String stderr; |
335 } | 335 } |
OLD | NEW |