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

Unified Diff: runtime/vm/message_handler.cc

Issue 46173002: - Make sure to keep the main/control port opened until the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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
Index: runtime/vm/message_handler.cc
===================================================================
--- runtime/vm/message_handler.cc (revision 29277)
+++ runtime/vm/message_handler.cc (working copy)
@@ -32,6 +32,7 @@
MessageHandler::MessageHandler()
: queue_(new MessageQueue()),
oob_queue_(new MessageQueue()),
+ control_ports_(0),
live_ports_(0),
pool_(NULL),
task_(NULL),
@@ -269,4 +270,22 @@
live_ports_--;
}
+
+void MessageHandler::increment_control_ports() {
+ MonitorLocker ml(&monitor_);
+#if defined(DEBUG)
+ CheckAccess();
+#endif
+ control_ports_++;
+}
+
+
+void MessageHandler::decrement_control_ports() {
+ MonitorLocker ml(&monitor_);
+#if defined(DEBUG)
+ CheckAccess();
+#endif
+ control_ports_--;
+}
+
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698