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

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

Issue 9597015: Update Timer API to take the callback as the last parameter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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/list_stream_impl.dart ('k') | runtime/bin/stream_util.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 29 matching lines...) Expand all
40 _in = new _Socket._internalReadOnly(); // stdout coming from process. 40 _in = new _Socket._internalReadOnly(); // stdout coming from process.
41 _out = new _Socket._internalWriteOnly(); // stdin going to process. 41 _out = new _Socket._internalWriteOnly(); // stdin going to process.
42 _err = new _Socket._internalReadOnly(); // stderr coming from process. 42 _err = new _Socket._internalReadOnly(); // stderr coming from process.
43 _exitHandler = new _Socket._internalReadOnly(); 43 _exitHandler = new _Socket._internalReadOnly();
44 _closed = false; 44 _closed = false;
45 _killed = false; 45 _killed = false;
46 _started = false; 46 _started = false;
47 _onExit = null; 47 _onExit = null;
48 // TODO(ager): Make the actual process starting really async instead of 48 // TODO(ager): Make the actual process starting really async instead of
49 // simulating it with a timer. 49 // simulating it with a timer.
50 new Timer((Timer ignore) => start(), 0); 50 new Timer(0, (Timer ignore) => start());
51 } 51 }
52 52
53 int _intFromBytes(List<int> bytes, int offset) { 53 int _intFromBytes(List<int> bytes, int offset) {
54 return (bytes[offset] + 54 return (bytes[offset] +
55 (bytes[offset + 1] << 8) + 55 (bytes[offset + 1] << 8) +
56 (bytes[offset + 2] << 16) + 56 (bytes[offset + 2] << 16) +
57 (bytes[offset + 3] << 24)); 57 (bytes[offset + 3] << 24));
58 } 58 }
59 59
60 void start() { 60 void start() {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 Socket _err; 202 Socket _err;
203 Socket _exitHandler; 203 Socket _exitHandler;
204 int _pid; 204 int _pid;
205 bool _closed; 205 bool _closed;
206 bool _killed; 206 bool _killed;
207 bool _started; 207 bool _started;
208 Function _onExit; 208 Function _onExit;
209 Function _onError; 209 Function _onError;
210 Function _onStart; 210 Function _onStart;
211 } 211 }
OLDNEW
« no previous file with comments | « runtime/bin/list_stream_impl.dart ('k') | runtime/bin/stream_util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698