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

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

Issue 8386029: Consistently use setters to set event handlers in native APIs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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/process.dart ('k') | runtime/bin/socket.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 if (_closed) { 139 if (_closed) {
140 throw new ProcessException("Process closed"); 140 throw new ProcessException("Process closed");
141 } 141 }
142 _in.close(); 142 _in.close();
143 _out.close(); 143 _out.close();
144 _err.close(); 144 _err.close();
145 _exitHandler.close(); 145 _exitHandler.close();
146 _closed = true; 146 _closed = true;
147 } 147 }
148 148
149 void setExitHandler(void callback(int exitCode)) { 149 void set exitHandler(void callback(int exitCode)) {
150 if (_closed) { 150 if (_closed) {
151 throw new ProcessException("Process closed"); 151 throw new ProcessException("Process closed");
152 } 152 }
153 if (_killed) { 153 if (_killed) {
154 throw new ProcessException("Process killed"); 154 throw new ProcessException("Process killed");
155 } 155 }
156 _exitHandlerCallback = callback; 156 _exitHandlerCallback = callback;
157 } 157 }
158 158
159 String _path; 159 String _path;
160 ObjectArray<String> _arguments; 160 ObjectArray<String> _arguments;
161 Socket _in; 161 Socket _in;
162 Socket _out; 162 Socket _out;
163 Socket _err; 163 Socket _err;
164 Socket _exitHandler; 164 Socket _exitHandler;
165 int _pid; 165 int _pid;
166 bool _closed; 166 bool _closed;
167 bool _killed; 167 bool _killed;
168 bool _started; 168 bool _started;
169 var _exitHandlerCallback; 169 var _exitHandlerCallback;
170 } 170 }
OLDNEW
« no previous file with comments | « runtime/bin/process.dart ('k') | runtime/bin/socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698