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

Side by Side Diff: runtime/vm/message_handler.cc

Issue 198463007: - Make ports be less predictable. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « no previous file | runtime/vm/port.h » ('j') | runtime/vm/port.cc » ('J')
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 #include "vm/message_handler.h" 5 #include "vm/message_handler.h"
6 #include "vm/port.h" 6 #include "vm/port.h"
7 #include "vm/dart.h" 7 #include "vm/dart.h"
8 8
9 namespace dart { 9 namespace dart {
10 10
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // The handler may have been deleted after this point. 244 // The handler may have been deleted after this point.
245 } 245 }
246 } 246 }
247 247
248 248
249 void MessageHandler::ClosePort(Dart_Port port) { 249 void MessageHandler::ClosePort(Dart_Port port) {
250 MonitorLocker ml(&monitor_); 250 MonitorLocker ml(&monitor_);
251 if (FLAG_trace_isolates) { 251 if (FLAG_trace_isolates) {
252 OS::Print("[-] Closing port:\n" 252 OS::Print("[-] Closing port:\n"
253 "\thandler: %s\n" 253 "\thandler: %s\n"
254 "\tport: %" Pd64 "\n", 254 "\tport: %" Pd64 "\n"
255 name(), port); 255 "\tports: %" Pd"/%" Pd "\n",
turnidge 2014/03/20 20:28:57 consider tagging control and live like this:
256 name(), port, control_ports_, live_ports_);
256 } 257 }
257 } 258 }
258 259
259 260
260 void MessageHandler::CloseAllPorts() { 261 void MessageHandler::CloseAllPorts() {
261 MonitorLocker ml(&monitor_); 262 MonitorLocker ml(&monitor_);
262 if (FLAG_trace_isolates) { 263 if (FLAG_trace_isolates) {
263 OS::Print("[-] Closing all ports:\n" 264 OS::Print("[-] Closing all ports:\n"
264 "\thandler: %s\n", 265 "\thandler: %s\n",
265 name()); 266 name());
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 299
299 void MessageHandler::decrement_control_ports() { 300 void MessageHandler::decrement_control_ports() {
300 MonitorLocker ml(&monitor_); 301 MonitorLocker ml(&monitor_);
301 #if defined(DEBUG) 302 #if defined(DEBUG)
302 CheckAccess(); 303 CheckAccess();
303 #endif 304 #endif
304 control_ports_--; 305 control_ports_--;
305 } 306 }
306 307
307 } // namespace dart 308 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/port.h » ('j') | runtime/vm/port.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698