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 | 5 @patch |
6 class _WindowsCodePageDecoder { | 6 class _WindowsCodePageDecoder { |
7 @patch | 7 @patch |
8 static String _decodeBytes(List<int> bytes) native "SystemEncodingToString"; | 8 static String _decodeBytes(List<int> bytes) native "SystemEncodingToString"; |
9 } | 9 } |
10 | 10 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 } | 158 } |
159 | 159 |
160 static Stream<ProcessSignal> _watchSignalInternal(ProcessSignal signal) { | 160 static Stream<ProcessSignal> _watchSignalInternal(ProcessSignal signal) { |
161 if (_signalControllers[signal._signalNumber] == null) { | 161 if (_signalControllers[signal._signalNumber] == null) { |
162 _signalControllers[signal._signalNumber] = new _SignalController(signal); | 162 _signalControllers[signal._signalNumber] = new _SignalController(signal); |
163 } | 163 } |
164 return _signalControllers[signal._signalNumber].stream; | 164 return _signalControllers[signal._signalNumber].stream; |
165 } | 165 } |
166 } | 166 } |
167 | 167 |
| 168 @patch |
| 169 class ProcessInfo { |
| 170 @patch |
| 171 static int get maxRss { |
| 172 var result = _maxRss(); |
| 173 if (result is OSError) { |
| 174 throw result; |
| 175 } |
| 176 return result; |
| 177 } |
| 178 |
| 179 @patch |
| 180 static int get currentRss { |
| 181 var result = _currentRss(); |
| 182 if (result is OSError) { |
| 183 throw result; |
| 184 } |
| 185 return result; |
| 186 } |
| 187 |
| 188 static _maxRss() native "ProcessInfo_MaxRSS"; |
| 189 static _currentRss() native "ProcessInfo_CurrentRSS"; |
| 190 } |
| 191 |
168 class _ProcessStartStatus { | 192 class _ProcessStartStatus { |
169 int _errorCode; // Set to OS error code if process start failed. | 193 int _errorCode; // Set to OS error code if process start failed. |
170 String _errorMessage; // Set to OS error message if process start failed. | 194 String _errorMessage; // Set to OS error message if process start failed. |
171 } | 195 } |
172 | 196 |
173 // The NativeFieldWrapperClass1 can not be used with a mixin, due to missing | 197 // The NativeFieldWrapperClass1 can not be used with a mixin, due to missing |
174 // implicit constructor. | 198 // implicit constructor. |
175 class _ProcessImplNativeWrapper extends NativeFieldWrapperClass1 {} | 199 class _ProcessImplNativeWrapper extends NativeFieldWrapperClass1 {} |
176 | 200 |
177 class _ProcessImpl extends _ProcessImplNativeWrapper implements Process { | 201 class _ProcessImpl extends _ProcessImplNativeWrapper implements Process { |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 var process = new _ProcessImpl( | 611 var process = new _ProcessImpl( |
588 executable, | 612 executable, |
589 arguments, | 613 arguments, |
590 workingDirectory, | 614 workingDirectory, |
591 environment, | 615 environment, |
592 includeParentEnvironment, | 616 includeParentEnvironment, |
593 runInShell, | 617 runInShell, |
594 ProcessStartMode.NORMAL); | 618 ProcessStartMode.NORMAL); |
595 return process._runAndWait(stdoutEncoding, stderrEncoding); | 619 return process._runAndWait(stdoutEncoding, stderrEncoding); |
596 } | 620 } |
OLD | NEW |