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

Unified Diff: runtime/vm/message_handler.h

Issue 456983002: Refactor isolate startup code in preparation for making isolate spawning more truly non-blocking. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/message_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/message_handler.h
diff --git a/runtime/vm/message_handler.h b/runtime/vm/message_handler.h
index 78da45d72e1df6e785126f070c1a1a3a47384e6d..65dc32f53c5597d5c0c563d6d57ec69debc34784 100644
--- a/runtime/vm/message_handler.h
+++ b/runtime/vm/message_handler.h
@@ -54,24 +54,13 @@ class MessageHandler {
// Returns true on success.
bool HandleOOBMessages();
- // The number of opened control ports is determined whether the isolate has
- // live ports. An isolate is considered not having any live ports if only
- // control ports are open.
- // Usually either 0 or 1.
- void increment_control_ports();
- void decrement_control_ports();
-
// A message handler tracks how many live ports it has.
- bool HasLivePorts() const { return live_ports_ > control_ports_; }
+ bool HasLivePorts() const { return live_ports_ > 0; }
intptr_t live_ports() const {
return live_ports_;
}
- intptr_t control_ports() const {
- return control_ports_;
- }
-
bool paused() const { return paused_ > 0; }
void increment_paused() { paused_++; }
@@ -168,7 +157,6 @@ class MessageHandler {
Monitor monitor_; // Protects all fields in MessageHandler.
MessageQueue* queue_;
MessageQueue* oob_queue_;
- intptr_t control_ports_; // The number of open control ports usually 0 or 1.
intptr_t live_ports_; // The number of open ports, including control ports.
intptr_t paused_; // The number of pause messages received.
bool pause_on_start_;
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698