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

Unified Diff: runtime/vm/message_handler.h

Issue 354763004: - Implement Isolate.pause and Isolate.resume. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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.h
===================================================================
--- runtime/vm/message_handler.h (revision 37860)
+++ runtime/vm/message_handler.h (working copy)
@@ -71,6 +71,11 @@
return control_ports_;
}
+ bool paused() const { return paused_ > 0; }
+
+ void increment_paused() { paused_++; }
siva 2014/07/01 21:42:56 How do we ensure paused does not overflow?
Lasse Reichstein Nielsen 2014/07/02 08:11:55 If paused_ is an intptr_t, and we store one resume
siva 2014/07/02 14:52:10 True but instead of relying on that one needs to s
Ivan Posva 2014/07/03 12:51:17 Isolate::AddResumeCapability now prevents overflow
+ void decrement_paused() { paused_--; }
siva 2014/07/01 21:42:56 ASSERT(paused_ > 0);
Ivan Posva 2014/07/03 12:51:17 Done.
+
bool pause_on_start() const {
return pause_on_start_;
}
@@ -164,6 +169,7 @@
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_;
bool pause_on_exit_;
bool paused_on_exit_;

Powered by Google App Engine
This is Rietveld 408576698